[PATCH] D22238: Reapply "InstCombine: Reduce trunc (shl x, K) width."

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 13 12:25:47 PDT 2016


arsenm added inline comments.

================
Comment at: lib/Transforms/InstCombine/InstCombineCasts.cpp:540
@@ +539,3 @@
+    // dest type is native.
+    if (match(Src, m_And(m_Value(A), m_ConstantInt(Cst)))) {
+      Value *NewTrunc = Builder->CreateTrunc(A, DestTy, A->getName() + ".tr");
----------------
majnemer wrote:
> Can `m_ConstantInt` be `m_Constant` here?
This would also require an additional variable since Cst is ConstantInt


https://reviews.llvm.org/D22238





More information about the llvm-commits mailing list