commit | ea8a2111690ab56450f7ab3cedcbcdbae17a87aa | [log] [tgz] |
---|---|---|
author | Sanjay Patel <spatel@rotateright.com> | Sat Jun 04 22:04:05 2016 +0000 |
committer | Sanjay Patel <spatel@rotateright.com> | Sat Jun 04 22:04:05 2016 +0000 |
tree | 4958cab8961f38b880dbf2e8f8ca81930d07752f | |
parent | 2ead861d074da501e5f6c5dca75324c86fbabb64 [diff] |
[InstCombine] allow vector constants for cast+icmp fold This is step 1 of unknown towards fixing PR28001: https://llvm.org/bugs/show_bug.cgi?id=28001 llvm-svn: 271810
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp index 0f119bf..e7f87d4 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
@@ -2439,7 +2439,7 @@ } // If we aren't dealing with a constant on the RHS, exit early. - auto *CI = dyn_cast<ConstantInt>(ICI.getOperand(1)); + auto *CI = dyn_cast<Constant>(ICI.getOperand(1)); if (!CI) return nullptr;