diff options
| author | Eli Friedman <eli.friedman@gmail.com> | 2009-12-17 21:27:47 +0000 |
|---|---|---|
| committer | Eli Friedman <eli.friedman@gmail.com> | 2009-12-17 21:27:47 +0000 |
| commit | 7cc86b4cc63ccb0d3117255a3b9b724c7f86f40f (patch) | |
| tree | 31fb31329017e31440a01012e459bc56a7c532d6 /llvm/lib | |
| parent | e43b403c87cf5432c57c0d841bd6beb65154b249 (diff) | |
| download | bcm5719-llvm-7cc86b4cc63ccb0d3117255a3b9b724c7f86f40f.tar.gz bcm5719-llvm-7cc86b4cc63ccb0d3117255a3b9b724c7f86f40f.zip | |
Make the ptrtoint comparison simplification work if one side is a global.
llvm-svn: 91624
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index c7359c4de76..2c73e7ae0fe 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp @@ -6452,7 +6452,7 @@ Instruction *InstCombiner::visitICmpInst(ICmpInst &I) { // if (X) ... // For generality, we handle any zero-extension of any operand comparison // with a constant or another cast from the same type. - if (isa<ConstantInt>(Op1) || isa<CastInst>(Op1)) + if (isa<Constant>(Op1) || isa<CastInst>(Op1)) if (Instruction *R = visitICmpInstWithCastAndCast(I)) return R; } |

