projects
/
platform
/
upstream
/
dotnet
/
runtime.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
df5f3e6
)
Improve codegen in impStringEqualsOrStartsWith (#90288)
author
Egor Bogatov
<egorbo@gmail.com>
Thu, 10 Aug 2023 18:08:58 +0000
(20:08 +0200)
committer
GitHub
<noreply@github.com>
Thu, 10 Aug 2023 18:08:58 +0000
(20:08 +0200)
src/coreclr/jit/importervectorization.cpp
patch
|
blob
|
history
diff --git
a/src/coreclr/jit/importervectorization.cpp
b/src/coreclr/jit/importervectorization.cpp
index
bb11a5a
..
0d89f45
100644
(file)
--- a/
src/coreclr/jit/importervectorization.cpp
+++ b/
src/coreclr/jit/importervectorization.cpp
@@
-616,10
+616,8
@@
GenTree* Compiler::impStringEqualsOrStartsWith(bool startsWith, CORINFO_SIG_INFO
op2 = impStackTop(0).val;
}
- if (!
(op1->OperIs(GT_CNS_STR) ^ op2->OperIs(GT_CNS_STR)
))
+ if (!
op1->OperIs(GT_CNS_STR) && !op2->OperIs(GT_CNS_STR
))
{
- // either op1 or op2 has to be CNS_STR, but not both - that case is optimized
- // just fine as is.
return nullptr;
}