[PATCH] D12866: [InstCombine] fold zexts and constants into a phi (PR24766)

hfinkel@anl.gov via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 22 15:58:15 PDT 2015


hfinkel added inline comments.

================
Comment at: lib/Transforms/InstCombine/InstCombinePHI.cpp:437
@@ +436,3 @@
+  // infinite loop without this check.
+  if (NumConsts == 0 || NumZexts < 2)
+    return nullptr;
----------------
Do we already have a regression test that covers these cases?


================
Comment at: test/Transforms/InstCombine/phi.ll:662
@@ +661,3 @@
+; CHECK-LABEL: @PR24766(
+; CHECK: phi i1
+}
----------------
Could you please actually check that the PHI itself is formed correctly, and add a test case that covers the handling of the truncated-constant incoming value?



http://reviews.llvm.org/D12866





More information about the llvm-commits mailing list