[GlobalISel] Do not generate illegal G_SEXTLOADs after legalization
authorKonstantin Schwarz <konstantin.schwarz@hightec-rt.com>
Tue, 24 Aug 2021 13:13:39 +0000 (15:13 +0200)
committerKonstantin Schwarz <konstantin.schwarz@hightec-rt.com>
Wed, 25 Aug 2021 08:13:39 +0000 (10:13 +0200)
commit4b4bc1ea16dec58e828ec3a0154046b10ec69242
tree2f280f417ab10b71f33056b0ff1a4f01a3520a83
parentea08c4cd1c0869ec5024a8bb3f5cdf06ab03ae83
[GlobalISel] Do not generate illegal G_SEXTLOADs after legalization

The sext_inreg_of_load combine did not have the isLegalOrBeforeLegalizer check,
leading to the generation of potentially illegal G_SEXTLOADs when run after legalization.

Reviewed By: foad

Differential Revision: https://reviews.llvm.org/D108626
llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
llvm/test/CodeGen/AMDGPU/GlobalISel/postlegalizer-combiner-sextload-from-sextinreg.mir [new file with mode: 0644]