[PATCH] D103874: [IR] Rename the shufflevector's undef mask to poison
Juneyoung Lee via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 8 00:36:06 PDT 2021
aqjune created this revision.
aqjune added reviewers: nikic, efriedma, spatel, fhahn, lebedev.ri, RKSimon.
Herald added a reviewer: deadalnix.
Herald added subscribers: dexonsmith, kerbowa, pengfei, dmgreen, zzheng, kbarton, hiraditya, nhaehnle, jvesely, nemanjai.
aqjune requested review of this revision.
Herald added projects: clang, LLVM.
Herald added subscribers: llvm-commits, cfe-commits.
This is a patch that renames shufflevector's undef mask to poison.
By D93818 <https://reviews.llvm.org/D93818>, shufflevector's undef mask isn't undef anymore; it returns poison instead.
%v = shufflevector <2 x i8> %x, <2 x i8> %y, <2 x i8> <i8 0, i8 poison>
; %v[0] = %x[0]
; %v[1] = poison
Since poison is more undefined than undef, this validates many existing transformations that we wanted to support.
Also, this allows more aggressive optimizations because poison is more propagative (e.g. poison & 0 = poison whereas undef & 0 != undef).
This patch updates shufflevector mask's printed string to be `poison` to match its new semantics.
This has changes in clang tests as well.
They are mainly about vector intrinsics being lowered into `shufflevector`.
The unused elements were filled with `undef` previously, but with this patch they are filled with `poison`.
Since they are unused elements anyway, I believe this isn't a functional change in fact.
But, I'm happy with this being double-checked by someone who works on these intrinsics as well.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D103874
Files:
clang/test/CodeGen/X86/avx-builtins.c
clang/test/CodeGen/X86/avx512f-builtins.c
clang/test/CodeGen/aarch64-bf16-lane-intrinsics.c
clang/test/CodeGen/builtins-ppc-p10vector.c
clang/test/CodeGen/builtins-ppc-p9vector.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/IR/Instructions.h
llvm/lib/Analysis/InstructionSimplify.cpp
llvm/lib/Analysis/ValueTracking.cpp
llvm/lib/IR/AsmWriter.cpp
llvm/lib/IR/ConstantFold.cpp
llvm/lib/IR/Core.cpp
llvm/lib/IR/Instructions.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/AMDGPU/shufflevector.ll
llvm/test/Analysis/CostModel/X86/reduction.ll
llvm/test/Analysis/CostModel/X86/shuffle-extract_subvector.ll
llvm/test/Analysis/CostModel/X86/shuffle-insert_subvector.ll
llvm/test/Analysis/CostModel/X86/shuffle-single-src.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/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/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/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.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/nsw-inseltpoison.ll
llvm/test/Transforms/InstCombine/nsw.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-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/ARM/interleaved-accesses-inseltpoison.ll
llvm/test/Transforms/InterleavedAccess/ARM/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/interleaved-accesses.ll
llvm/test/Transforms/LowerMatrixIntrinsics/bigger-expressions-double.ll
llvm/test/Transforms/LowerMatrixIntrinsics/const-gep.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.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.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/gather-root.ll
llvm/test/Transforms/SLPVectorizer/AArch64/transpose-inseltpoison.ll
llvm/test/Transforms/SLPVectorizer/AArch64/transpose.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/X86/PR35865-inseltpoison.ll
llvm/test/Transforms/SLPVectorizer/X86/PR35865.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/cmp_commute-inseltpoison.ll
llvm/test/Transforms/SLPVectorizer/X86/cmp_commute.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/load-merge-inseltpoison.ll
llvm/test/Transforms/SLPVectorizer/X86/load-merge.ll
llvm/test/Transforms/SLPVectorizer/X86/phi.ll
llvm/test/Transforms/SLPVectorizer/X86/pr47629-inseltpoison.ll
llvm/test/Transforms/SLPVectorizer/X86/pr47629.ll
llvm/test/Transforms/SLPVectorizer/X86/pr49081.ll
llvm/test/Transforms/SLPVectorizer/X86/resched.ll
llvm/test/Transforms/SLPVectorizer/X86/sext-inseltpoison.ll
llvm/test/Transforms/SLPVectorizer/X86/sext.ll
llvm/test/Transforms/SROA/slice-width.ll
llvm/test/Transforms/SROA/vector-promotion.ll
llvm/test/Transforms/VectorCombine/AArch64/load-extractelement-scalarization.ll
llvm/test/Transforms/VectorCombine/AMDGPU/as-transition-inseltpoison.ll
llvm/test/Transforms/VectorCombine/AMDGPU/as-transition.ll
llvm/test/Transforms/VectorCombine/X86/extract-binop-inseltpoison.ll
llvm/test/Transforms/VectorCombine/X86/extract-binop.ll
llvm/test/Transforms/VectorCombine/X86/extract-cmp-binop.ll
llvm/test/Transforms/VectorCombine/X86/extract-cmp.ll
llvm/test/Transforms/VectorCombine/X86/load-inseltpoison.ll
llvm/test/Transforms/VectorCombine/X86/load.ll
llvm/tools/llvm-c-test/echo.cpp
More information about the cfe-commits
mailing list