[PATCH] D81634: Remove assert from ShuffleVectorInst
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 11 06:35:19 PDT 2020
spatel accepted this revision.
spatel added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: llvm/lib/IR/Instructions.cpp:2056
}
- assert((UsesLHS ^ UsesRHS) && "Should have selected from exactly 1 source");
- return true;
+ // Allow for degenerate case: completely undef mask means neither source is used.
+ return UsesLHS || UsesRHS;
----------------
Formatting: 80-column.
================
Comment at: llvm/test/Transforms/CodeGenPrepare/X86/cgp_shuffle_crash.ll:13
+CF: ; preds = %CF, %BB
+ %Cmp82 = icmp slt i32 480483, undef
+ br i1 undef, label %CF, label %CF242
----------------
bugpoint tends to produce tests like this with undef/unused values, and then those tests wiggle or become worthless when unrelated improvements are made. For that reason, I still prefer my more-defined version of the test. :)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81634/new/
https://reviews.llvm.org/D81634
More information about the llvm-commits
mailing list