[PATCH] D14721: patch for missed constantFold optimization in InstCombine

Meador Inge via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 20 11:47:57 PST 2015


meadori added a subscriber: meadori.

================
Comment at: lib/Analysis/ConstantFolding.cpp:1140
@@ -1139,1 +1139,3 @@
       }
+      
+      // ConstantFold a compare instruction with addrspacecast as the
----------------
Seems to be some extraneous spaces here.

================
Comment at: lib/Analysis/ConstantFolding.cpp:1147
@@ +1146,3 @@
+          Constant *Null = Constant::getNullValue(C->getType());
+          return ConstantFoldCompareInstOperands(Predicate, C, Null, TD, TLI);
+      }
----------------
Is this patch against mainline trunk?

Invocations of `ConstantFoldCompareInstOperands` that I see look like:

```
ConstantFoldCompareInstOperands(Predicate, C, Null, DL, TLI);
```


http://reviews.llvm.org/D14721





More information about the llvm-commits mailing list