projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ef843c8
)
[SCCP] add a code comment about sitofp -> uitofp; NFC
author
Sanjay Patel
<spatel@rotateright.com>
Fri, 30 Sep 2022 20:40:10 +0000
(16:40 -0400)
committer
Sanjay Patel
<spatel@rotateright.com>
Fri, 30 Sep 2022 21:26:10 +0000
(17:26 -0400)
D134975 would have added this fold, but we decided it's
not worth doing without some evidence of benefit.
llvm/lib/Transforms/Scalar/SCCP.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Transforms/Scalar/SCCP.cpp
b/llvm/lib/Transforms/Scalar/SCCP.cpp
index
422a41e
..
f6868cd
100644
(file)
--- a/
llvm/lib/Transforms/Scalar/SCCP.cpp
+++ b/
llvm/lib/Transforms/Scalar/SCCP.cpp
@@
-173,6
+173,8
@@
static bool replaceSignedInst(SCCPSolver &Solver,
Instruction *NewInst = nullptr;
switch (Inst.getOpcode()) {
+ // Note: We do not fold sitofp -> uitofp here because that could be more
+ // expensive in codegen and may not be reversible in the backend.
case Instruction::SExt: {
// If the source value is not negative, this is a zext.
Value *Op0 = Inst.getOperand(0);