[PATCH] D20983: [InstCombine] scalarizePHI should not assume the code it sees has been CSE'd
David Majnemer via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 3 13:09:29 PDT 2016
majnemer added inline comments.
================
Comment at: lib/Transforms/InstCombine/InstCombineVectorOps.cpp:69
@@ -68,4 +68,3 @@
Instruction *InstCombiner::scalarizePHI(ExtractElementInst &EI, PHINode *PN) {
- // Verify that the PHI node has exactly 2 uses. Otherwise return NULL.
- if (!PN->hasNUses(2))
- return nullptr;
+ SmallVector <Instruction*, 2> Extracts;
+ // The users we want the PHI to have are:
----------------
Please clang-format this.
================
Comment at: test/Transforms/InstCombine/vec_phi_extract.ll:30-32
@@ +29,5 @@
+define void @copy(i64 %val, i32 %limit, i32 *%ptr) {
+; CHECK-LABEL: @copy
+; CHECK: %0 = trunc i64
+; CHECK: %1 = phi i32
+entry:
----------------
Please give these instructions some operands.
http://reviews.llvm.org/D20983
More information about the llvm-commits
mailing list