[PATCH] D149210: [IR] Change shufflevector undef mask to poison

Manuel Brito via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 25 15:36:12 PDT 2023


ManuelJBrito created this revision.
ManuelJBrito added reviewers: aqjune, efriedma, RKSimon, nikic, nlopes, spatel.
Herald added a reviewer: deadalnix.
Herald added subscribers: luke, kosarev, StephenFan, frasercrmck, okura, kuter, lebedev.ri, kerbowa, luismarques, apazos, sameer.abuasal, pengfei, s.egerton, dmgreen, Jim, jocewei, PkmX, arphaman, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, kbarton, hiraditya, jvesely, nemanjai.
Herald added a reviewer: lebedev.ri.
Herald added a project: All.
ManuelJBrito requested review of this revision.
Herald added subscribers: llvm-commits, cfe-commits, pcwang-thead, MaskRay.
Herald added a reviewer: jdoerfert.
Herald added a reviewer: sstefan1.
Herald added projects: clang, LLVM.

With this patch an undefined mask in a shufflevector will be printed as poison.
This change is done to support the new shufflevector semantics for undefined mask elements (see  D148637 <https://reviews.llvm.org/D148637>).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D149210

Files:
  clang/test/CodeGen/PowerPC/builtins-ppc-p10vector.c
  clang/test/CodeGen/PowerPC/builtins-ppc-p9vector.c
  clang/test/CodeGen/builtins-nondeterministic-value.c
  clang/test/CodeGen/builtinshufflevector2.c
  clang/test/CodeGen/ext-vector.c
  clang/test/CodeGenOpenCL/as_type.cl
  clang/test/CodeGenOpenCL/partial_initializer.cl
  clang/test/CodeGenOpenCL/preserve_vec3.cl
  clang/test/CodeGenOpenCL/vector_literals.cl
  clang/test/CodeGenOpenCL/vector_shufflevector.cl
  llvm/include/llvm-c/Core.h
  llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
  llvm/include/llvm/IR/Instructions.h
  llvm/lib/Analysis/InstructionSimplify.cpp
  llvm/lib/Analysis/ValueTracking.cpp
  llvm/lib/Analysis/VectorUtils.cpp
  llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
  llvm/lib/IR/AsmWriter.cpp
  llvm/lib/IR/ConstantFold.cpp
  llvm/lib/IR/Core.cpp
  llvm/lib/IR/Instructions.cpp
  llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
  llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
  llvm/lib/Target/X86/X86TargetTransformInfo.cpp
  llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
  llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
  llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
  llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
  llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
  llvm/lib/Transforms/Scalar/ScalarizeMaskedMemIntrin.cpp
  llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
  llvm/lib/Transforms/Vectorize/VectorCombine.cpp
  llvm/test/Analysis/CostModel/RISCV/shuffle-extract_subvector.ll
  llvm/test/Analysis/CostModel/RISCV/shuffle-insert_subvector.ll
  llvm/test/Analysis/CostModel/X86/reduction.ll
  llvm/test/Analysis/CostModel/X86/shuffle-extract_subvector-codesize.ll
  llvm/test/Analysis/CostModel/X86/shuffle-extract_subvector-latency.ll
  llvm/test/Analysis/CostModel/X86/shuffle-extract_subvector-sizelatency.ll
  llvm/test/Analysis/CostModel/X86/shuffle-extract_subvector.ll
  llvm/test/Analysis/CostModel/X86/shuffle-insert_subvector-codesize.ll
  llvm/test/Analysis/CostModel/X86/shuffle-insert_subvector-latency.ll
  llvm/test/Analysis/CostModel/X86/shuffle-insert_subvector-sizelatency.ll
  llvm/test/Analysis/CostModel/X86/shuffle-insert_subvector.ll
  llvm/test/Analysis/CostModel/X86/shuffle-single-src-codesize.ll
  llvm/test/Analysis/CostModel/X86/shuffle-single-src-latency.ll
  llvm/test/Analysis/CostModel/X86/shuffle-single-src-sizelatency.ll
  llvm/test/Analysis/CostModel/X86/shuffle-single-src.ll
  llvm/test/CodeGen/AMDGPU/amdgpu-codegenprepare-break-large-phis-heuristics.ll
  llvm/test/CodeGen/AMDGPU/rewrite-out-arguments.ll
  llvm/test/CodeGen/Generic/expand-experimental-reductions.ll
  llvm/test/CodeGen/PowerPC/arg_promotion.ll
  llvm/test/Instrumentation/MemorySanitizer/avx-intrinsics-x86.ll
  llvm/test/Transforms/Attributor/nofpclass.ll
  llvm/test/Transforms/CodeGenPrepare/X86/x86-shuffle-sink-inseltpoison.ll
  llvm/test/Transforms/CodeGenPrepare/X86/x86-shuffle-sink.ll
  llvm/test/Transforms/DeadStoreElimination/masked-dead-store-inseltpoison.ll
  llvm/test/Transforms/DeadStoreElimination/masked-dead-store.ll
  llvm/test/Transforms/InstCombine/AArch64/demandelts.ll
  llvm/test/Transforms/InstCombine/AMDGPU/amdgcn-demanded-vector-elts-inseltpoison.ll
  llvm/test/Transforms/InstCombine/AMDGPU/amdgcn-demanded-vector-elts.ll
  llvm/test/Transforms/InstCombine/X86/x86-addsub-inseltpoison.ll
  llvm/test/Transforms/InstCombine/X86/x86-addsub.ll
  llvm/test/Transforms/InstCombine/X86/x86-avx2-inseltpoison.ll
  llvm/test/Transforms/InstCombine/X86/x86-avx2.ll
  llvm/test/Transforms/InstCombine/X86/x86-avx512-inseltpoison.ll
  llvm/test/Transforms/InstCombine/X86/x86-avx512.ll
  llvm/test/Transforms/InstCombine/X86/x86-muldq-inseltpoison.ll
  llvm/test/Transforms/InstCombine/X86/x86-muldq.ll
  llvm/test/Transforms/InstCombine/X86/x86-pack-inseltpoison.ll
  llvm/test/Transforms/InstCombine/X86/x86-pack.ll
  llvm/test/Transforms/InstCombine/X86/x86-pshufb-inseltpoison.ll
  llvm/test/Transforms/InstCombine/X86/x86-pshufb.ll
  llvm/test/Transforms/InstCombine/X86/x86-sse4a-inseltpoison.ll
  llvm/test/Transforms/InstCombine/X86/x86-sse4a.ll
  llvm/test/Transforms/InstCombine/X86/x86-vpermil-inseltpoison.ll
  llvm/test/Transforms/InstCombine/X86/x86-vpermil.ll
  llvm/test/Transforms/InstCombine/bitreverse.ll
  llvm/test/Transforms/InstCombine/broadcast-inseltpoison.ll
  llvm/test/Transforms/InstCombine/broadcast.ll
  llvm/test/Transforms/InstCombine/bswap-inseltpoison.ll
  llvm/test/Transforms/InstCombine/bswap.ll
  llvm/test/Transforms/InstCombine/canonicalize-vector-insert.ll
  llvm/test/Transforms/InstCombine/extractelement-inseltpoison.ll
  llvm/test/Transforms/InstCombine/extractelement.ll
  llvm/test/Transforms/InstCombine/insert-const-shuf-inseltpoison.ll
  llvm/test/Transforms/InstCombine/insert-const-shuf.ll
  llvm/test/Transforms/InstCombine/insert-extract-shuffle-inseltpoison.ll
  llvm/test/Transforms/InstCombine/insert-extract-shuffle.ll
  llvm/test/Transforms/InstCombine/masked_intrinsics-inseltpoison.ll
  llvm/test/Transforms/InstCombine/masked_intrinsics.ll
  llvm/test/Transforms/InstCombine/minmax-intrinsics.ll
  llvm/test/Transforms/InstCombine/nsw-inseltpoison.ll
  llvm/test/Transforms/InstCombine/nsw.ll
  llvm/test/Transforms/InstCombine/reduction-shufflevector.ll
  llvm/test/Transforms/InstCombine/select-extractelement-inseltpoison.ll
  llvm/test/Transforms/InstCombine/select-extractelement.ll
  llvm/test/Transforms/InstCombine/select-select.ll
  llvm/test/Transforms/InstCombine/shuffle-binop.ll
  llvm/test/Transforms/InstCombine/shuffle-select-narrow-inseltpoison.ll
  llvm/test/Transforms/InstCombine/shuffle-select-narrow.ll
  llvm/test/Transforms/InstCombine/shuffle_select-inseltpoison.ll
  llvm/test/Transforms/InstCombine/shuffle_select.ll
  llvm/test/Transforms/InstCombine/shufflevec-bitcast-inseltpoison.ll
  llvm/test/Transforms/InstCombine/shufflevec-bitcast.ll
  llvm/test/Transforms/InstCombine/shufflevector-div-rem-inseltpoison.ll
  llvm/test/Transforms/InstCombine/shufflevector-div-rem.ll
  llvm/test/Transforms/InstCombine/sub-of-negatible-inseltpoison.ll
  llvm/test/Transforms/InstCombine/sub-of-negatible.ll
  llvm/test/Transforms/InstCombine/trunc-inseltpoison.ll
  llvm/test/Transforms/InstCombine/trunc.ll
  llvm/test/Transforms/InstCombine/type_pun-inseltpoison.ll
  llvm/test/Transforms/InstCombine/type_pun.ll
  llvm/test/Transforms/InstCombine/vec-binop-select-inseltpoison.ll
  llvm/test/Transforms/InstCombine/vec-binop-select.ll
  llvm/test/Transforms/InstCombine/vec_demanded_elts-inseltpoison.ll
  llvm/test/Transforms/InstCombine/vec_demanded_elts.ll
  llvm/test/Transforms/InstCombine/vec_shuffle-inseltpoison.ll
  llvm/test/Transforms/InstCombine/vec_shuffle.ll
  llvm/test/Transforms/InstCombine/vector-casts.ll
  llvm/test/Transforms/InstCombine/vector-concat-binop-inseltpoison.ll
  llvm/test/Transforms/InstCombine/vector-concat-binop.ll
  llvm/test/Transforms/InstSimplify/shufflevector-inseltpoison.ll
  llvm/test/Transforms/InstSimplify/shufflevector.ll
  llvm/test/Transforms/InterleavedAccess/AArch64/interleaved-accesses-inseltpoison.ll
  llvm/test/Transforms/InterleavedAccess/AArch64/interleaved-accesses.ll
  llvm/test/Transforms/InterleavedAccess/AArch64/sve-interleaved-accesses.ll
  llvm/test/Transforms/InterleavedAccess/ARM/interleaved-accesses-inseltpoison.ll
  llvm/test/Transforms/InterleavedAccess/ARM/interleaved-accesses.ll
  llvm/test/Transforms/InterleavedAccess/RISCV/interleaved-accesses.ll
  llvm/test/Transforms/InterleavedAccess/X86/interleaved-accesses-64bits-avx-inseltpoison.ll
  llvm/test/Transforms/InterleavedAccess/X86/interleaved-accesses-64bits-avx.ll
  llvm/test/Transforms/InterleavedAccess/X86/interleavedStore-inseltpoison.ll
  llvm/test/Transforms/InterleavedAccess/X86/interleavedStore.ll
  llvm/test/Transforms/LoopUnroll/X86/pr46430-inseltpoison.ll
  llvm/test/Transforms/LoopUnroll/X86/pr46430.ll
  llvm/test/Transforms/LoopVectorize/AArch64/interleaved-store-of-first-order-recurrence.ll
  llvm/test/Transforms/LoopVectorize/RISCV/interleaved-accesses.ll
  llvm/test/Transforms/LoopVectorize/X86/x86-interleaved-store-accesses-with-gaps.ll
  llvm/test/Transforms/LoopVectorize/interleaved-accesses.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/bigger-expressions-double.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/const-gep.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/dot-product-transpose-int.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/load-align-volatile.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/multiply-add-sub-double-row-major.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/multiply-double-contraction-fmf.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/multiply-double-contraction.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/multiply-double-row-major.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/multiply-double.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/multiply-float-contraction-fmf.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/multiply-float-contraction.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/multiply-float.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/multiply-i32-row-major.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/multiply-i32.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/multiply-left-transpose-row-major.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/multiply-right-transpose.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/preserve-existing-fast-math-flags.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/propagate-backwards-unsupported.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/strided-load-double.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/strided-load-float.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/strided-load-i32.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/transpose-double.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/transpose-float.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/transpose-i32.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/transpose-opts-iterator-invalidation.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/transpose-opts.ll
  llvm/test/Transforms/PhaseOrdering/ARM/mve-floatreduce.ll
  llvm/test/Transforms/PhaseOrdering/X86/vector-reductions-expanded.ll
  llvm/test/Transforms/PhaseOrdering/X86/vector-reductions-logical.ll
  llvm/test/Transforms/PhaseOrdering/X86/vector-reductions.ll
  llvm/test/Transforms/SLPVectorizer/AArch64/accelerate-vector-functions-inseltpoison.ll
  llvm/test/Transforms/SLPVectorizer/AArch64/accelerate-vector-functions.ll
  llvm/test/Transforms/SLPVectorizer/AArch64/loadorder.ll
  llvm/test/Transforms/SLPVectorizer/AArch64/transpose-inseltpoison.ll
  llvm/test/Transforms/SLPVectorizer/AArch64/transpose.ll
  llvm/test/Transforms/SLPVectorizer/AArch64/tsc-s116.ll
  llvm/test/Transforms/SLPVectorizer/AArch64/vectorize-free-extracts-inserts.ll
  llvm/test/Transforms/SLPVectorizer/AMDGPU/add_sub_sat-inseltpoison.ll
  llvm/test/Transforms/SLPVectorizer/AMDGPU/add_sub_sat.ll
  llvm/test/Transforms/SLPVectorizer/AMDGPU/crash_extract_subvector_cost.ll
  llvm/test/Transforms/SLPVectorizer/AMDGPU/phi-result-use-order.ll
  llvm/test/Transforms/SLPVectorizer/RISCV/math-function.ll
  llvm/test/Transforms/SLPVectorizer/RISCV/reductions.ll
  llvm/test/Transforms/SLPVectorizer/SystemZ/pr34619.ll
  llvm/test/Transforms/SLPVectorizer/X86/PR35865-inseltpoison.ll
  llvm/test/Transforms/SLPVectorizer/X86/PR35865.ll
  llvm/test/Transforms/SLPVectorizer/X86/addsub.ll
  llvm/test/Transforms/SLPVectorizer/X86/alternate-calls-inseltpoison.ll
  llvm/test/Transforms/SLPVectorizer/X86/alternate-calls.ll
  llvm/test/Transforms/SLPVectorizer/X86/alternate-cast-inseltpoison.ll
  llvm/test/Transforms/SLPVectorizer/X86/alternate-cast.ll
  llvm/test/Transforms/SLPVectorizer/X86/alternate-fp-inseltpoison.ll
  llvm/test/Transforms/SLPVectorizer/X86/alternate-fp.ll
  llvm/test/Transforms/SLPVectorizer/X86/alternate-int-inseltpoison.ll
  llvm/test/Transforms/SLPVectorizer/X86/alternate-int.ll
  llvm/test/Transforms/SLPVectorizer/X86/arith-fp-inseltpoison.ll
  llvm/test/Transforms/SLPVectorizer/X86/arith-fp.ll
  llvm/test/Transforms/SLPVectorizer/X86/blending-shuffle-inseltpoison.ll
  llvm/test/Transforms/SLPVectorizer/X86/blending-shuffle.ll
  llvm/test/Transforms/SLPVectorizer/X86/broadcast_long.ll
  llvm/test/Transforms/SLPVectorizer/X86/buildvector-insert-mask-size.ll
  llvm/test/Transforms/SLPVectorizer/X86/buildvector-same-lane-insert.ll
  llvm/test/Transforms/SLPVectorizer/X86/buildvector-shuffle.ll
  llvm/test/Transforms/SLPVectorizer/X86/c-ray.ll
  llvm/test/Transforms/SLPVectorizer/X86/commutativity.ll
  llvm/test/Transforms/SLPVectorizer/X86/crash_cmpop.ll
  llvm/test/Transforms/SLPVectorizer/X86/crash_lencod-inseltpoison.ll
  llvm/test/Transforms/SLPVectorizer/X86/crash_scheduling-inseltpoison.ll
  llvm/test/Transforms/SLPVectorizer/X86/crash_scheduling.ll
  llvm/test/Transforms/SLPVectorizer/X86/entries-different-vf.ll
  llvm/test/Transforms/SLPVectorizer/X86/external-used-across-reductions.ll
  llvm/test/Transforms/SLPVectorizer/X86/extract-many-users-buildvector.ll
  llvm/test/Transforms/SLPVectorizer/X86/extract-scalar-from-undef.ll
  llvm/test/Transforms/SLPVectorizer/X86/extract_with_non_const_index.ll
  llvm/test/Transforms/SLPVectorizer/X86/gather-move-out-of-loop.ll
  llvm/test/Transforms/SLPVectorizer/X86/hadd-inseltpoison.ll
  llvm/test/Transforms/SLPVectorizer/X86/hadd.ll
  llvm/test/Transforms/SLPVectorizer/X86/insert-element-build-vector-const-undef.ll
  llvm/test/Transforms/SLPVectorizer/X86/insert-element-build-vector-inseltpoison.ll
  llvm/test/Transforms/SLPVectorizer/X86/insert-element-build-vector.ll
  llvm/test/Transforms/SLPVectorizer/X86/jumbled_store_crash.ll
  llvm/test/Transforms/SLPVectorizer/X86/landing_pad.ll
  llvm/test/Transforms/SLPVectorizer/X86/load-merge-inseltpoison.ll
  llvm/test/Transforms/SLPVectorizer/X86/load-merge.ll
  llvm/test/Transforms/SLPVectorizer/X86/load-partial-vector-shuffle.ll
  llvm/test/Transforms/SLPVectorizer/X86/lookahead.ll
  llvm/test/Transforms/SLPVectorizer/X86/matched-shuffled-entries.ll
  llvm/test/Transforms/SLPVectorizer/X86/memory-runtime-checks.ll
  llvm/test/Transforms/SLPVectorizer/X86/operandorder.ll
  llvm/test/Transforms/SLPVectorizer/X86/peek-through-shuffle.ll
  llvm/test/Transforms/SLPVectorizer/X86/phi.ll
  llvm/test/Transforms/SLPVectorizer/X86/pr47642.ll
  llvm/test/Transforms/SLPVectorizer/X86/pr49081.ll
  llvm/test/Transforms/SLPVectorizer/X86/reduced-gathered-vectorized.ll
  llvm/test/Transforms/SLPVectorizer/X86/reduction2.ll
  llvm/test/Transforms/SLPVectorizer/X86/reorder-clustered-node.ll
  llvm/test/Transforms/SLPVectorizer/X86/reorder-reused-masked-gather.ll
  llvm/test/Transforms/SLPVectorizer/X86/resched.ll
  llvm/test/Transforms/SLPVectorizer/X86/reused-extractelements.ll
  llvm/test/Transforms/SLPVectorizer/X86/reused-scalars-in-buildvector.ll
  llvm/test/Transforms/SLPVectorizer/X86/root-trunc-extract-reuse.ll
  llvm/test/Transforms/SLPVectorizer/X86/scatter-vectorize-reused-pointer.ll
  llvm/test/Transforms/SLPVectorizer/X86/shuffle-multiple-nodes.ll
  llvm/test/Transforms/SLPVectorizer/X86/sitofp-inseltpoison.ll
  llvm/test/Transforms/SLPVectorizer/X86/sitofp.ll
  llvm/test/Transforms/SLPVectorizer/X86/split-load8_2-unord.ll
  llvm/test/Transforms/SLPVectorizer/X86/tiny-tree.ll
  llvm/test/Transforms/SLPVectorizer/X86/vec_list_bias-inseltpoison.ll
  llvm/test/Transforms/SLPVectorizer/X86/vec_list_bias.ll
  llvm/test/Transforms/SLPVectorizer/X86/vec_list_bias_external_insert_shuffled.ll
  llvm/test/Transforms/SLPVectorizer/X86/vect-gather-same-nodes.ll
  (18 more files...)



More information about the cfe-commits mailing list