[all-commits] [llvm/llvm-project] bddac4: [GlobalISel] Fix invalid combine of unmerge(merge)...
Dominik Montada via All-commits
all-commits at lists.llvm.org
Wed Apr 15 08:19:35 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: bddac41b9f1ae80b56dace7d55cd81a07147ff3d
https://github.com/llvm/llvm-project/commit/bddac41b9f1ae80b56dace7d55cd81a07147ff3d
Author: Dominik Montada <dominik.montada at hightec-rt.com>
Date: 2020-04-15 (Wed, 15 Apr 2020)
Changed paths:
M llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h
M llvm/test/CodeGen/AMDGPU/GlobalISel/artifact-combiner-unmerge-values.mir
A llvm/test/CodeGen/AMDGPU/GlobalISel/cvt_f32_ubyte-xfail.ll
M llvm/test/CodeGen/AMDGPU/GlobalISel/cvt_f32_ubyte.ll
M llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-bitcast.mir
M llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-merge-values.mir
M llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-unmerge-values.mir
A llvm/test/CodeGen/AMDGPU/GlobalISel/zextload-xfail.ll
M llvm/test/CodeGen/AMDGPU/GlobalISel/zextload.ll
Log Message:
-----------
[GlobalISel] Fix invalid combine of unmerge(merge) with intermediate cast
Summary:
The combine for unmerge(cast(merge)) is only valid for vectors, but was
missing a corresponding check. Add a check that the operands are vectors
to avoid an invalid combine.
Without this check, the combiner would emit incorrect code for scalars
and pointers because the artifact cast (trunc/ext) only affects bits at
the end of the type, while this combine assumes that the casted bits
appear between meaningful bits.
This also uncovered a segmentation fault in the AMDGPU
InstructionSelector. The tests triggering this bug have been moved to
their own file and a check for the segmentation fault has been added.
Reviewers: arsenm, dsanders, aemerson, paquette, aditya_nandakumar
Reviewed By: arsenm
Subscribers: tpr, jvesely, wdng, nhaehnle, rovka, kerbowa, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78191
More information about the All-commits
mailing list