[llvm] [InstCombine] Fold icmp(constants[x]) when the range of x is given (PR #67093)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 22 04:02:26 PST 2023


================
@@ -209,21 +208,22 @@ Instruction *InstCombinerImpl::foldCmpLoadFromIndexedGlobal(
 
     // Find out if the comparison would be true or false for the i'th element.
     Constant *C = ConstantFoldCompareInstOperands(ICI.getPredicate(), Elt,
-                                                  CompareRHS, DL, &TLI);
+                                                  ComparedRHS, DL, &TLI);
     // If the result is undef for this element, ignore it.
     if (isa<UndefValue>(C)) {
       // Extend range state machines to cover this element in case there is an
       // undef in the middle of the range.
-      if (TrueRangeEnd == (int)i-1)
+      if (TrueRangeEnd == (int)i - 1)
----------------
nikic wrote:

Can you please pre-commit these minor formatting fixes?

https://github.com/llvm/llvm-project/pull/67093


More information about the llvm-commits mailing list