AMDGPU: Make various vector undefs legal
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 27 Sep 2022 03:07:49 +0000 (23:07 -0400)
committerMatt Arsenault <arsenm2@gmail.com>
Wed, 28 Sep 2022 14:48:52 +0000 (10:48 -0400)
commit7a84624079a2656c684bed6100708544500c5a32
treeef8a1a6e1c6ba06d0aa49b12b6c3350fbd43ad61
parent0a4771a7e845e5be750523219c314a0a61d9a0cb
AMDGPU: Make various vector undefs legal

Surprisingly these were getting legalized to something
zero initialized.

This fixes an infinite loop when combining some vector types.
Also fixes zero initializing some undef values.

SimplifyDemandedVectorElts / SimplifyDemandedBits are not checking
for the legality of the output undefs they are replacing unused
operations with. This resulted in turning vectors into undefs
that were later re-legalized back into zero vectors.
13 files changed:
llvm/lib/Target/AMDGPU/SIISelLowering.cpp
llvm/test/CodeGen/AMDGPU/commute-shifts.ll
llvm/test/CodeGen/AMDGPU/cross-block-use-is-not-abi-copy.ll
llvm/test/CodeGen/AMDGPU/dagcombine-fma-fmad.ll
llvm/test/CodeGen/AMDGPU/extract-subvector-16bit.ll
llvm/test/CodeGen/AMDGPU/insert_vector_elt.ll
llvm/test/CodeGen/AMDGPU/select-undef.ll
llvm/test/CodeGen/AMDGPU/skip-if-dead.ll
llvm/test/CodeGen/AMDGPU/tuple-allocation-failure.ll
llvm/test/CodeGen/AMDGPU/v1024.ll
llvm/test/CodeGen/AMDGPU/vgpr-tuple-allocation.ll
llvm/test/CodeGen/AMDGPU/wmma_modifiers.ll
llvm/test/CodeGen/AMDGPU/wqm.ll