[PATCH] D136256: [InstCombine] Fix assert condition in `foldSelectShuffleOfSelectShuffle`
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 19 07:24:30 PDT 2022
RKSimon added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp:2008
+ // A select mask with undef elements might look like an identity mask.
+ assert((ShuffleVectorInst::isSelectMask(NewMask) || ShuffleVectorInst::isIdentityMask(NewMask)) && "Unexpected shuffle mask");
return new ShuffleVectorInst(X, Y, NewMask);
----------------
clang-format this please :)
================
Comment at: llvm/test/Transforms/InstCombine/foldSelectShuffleOfSelectShuffle.ll:3
+
+; CHECK: shufflevector <4 x float> %1, <4 x float> poison, <4 x i32> <i32 0, i32 undef, i32 2, i32 3>
+
----------------
Use the update_test_checks script to autogenerate the checks
================
Comment at: llvm/test/Transforms/InstCombine/foldSelectShuffleOfSelectShuffle.ll:7
+ at h = dso_local local_unnamed_addr global [4 x float] zeroinitializer, align 16
+define <4 x float> @square() local_unnamed_addr #0 {
+ %1 = load <4 x float>, ptr @g, align 16
----------------
remove local_unnamed_addr #0
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136256/new/
https://reviews.llvm.org/D136256
More information about the llvm-commits
mailing list