diff options
author | Sanjay Patel <spatel@rotateright.com> | 2020-02-04 07:02:01 -0500 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2020-02-04 07:45:48 -0500 |
commit | 0cf0be993c382f15c277de6d0db8be6a236c7c50 (patch) | |
tree | 95f939e879328f400b1846c51545c6869bacaeed /llvm/lib/CodeGen/MachineFunction.cpp | |
parent | 8c681f5e4706d3d2980f19f08dd0d4c40496a8d5 (diff) | |
download | llvm-0cf0be993c382f15c277de6d0db8be6a236c7c50.zip llvm-0cf0be993c382f15c277de6d0db8be6a236c7c50.tar.gz llvm-0cf0be993c382f15c277de6d0db8be6a236c7c50.tar.bz2 |
[InstCombine] fix operands of shouldChangeType() for casted phi transform
This is a bug noted in the recent D72733 and seen
in the similar transform just above the changed source code.
I added tests with illegal types and zexts to show the bug -
we could transform legal phi ops to illegal, etc. I did not add
tests with trunc because we won't see any diffs on those patterns.
That is because InstCombiner::SliceUpIllegalIntegerPHI() appears to
do those transforms independently of datalayout. It can also create
more casts than are present in existing code.
There are some existing regression tests that do not include a
datalayout that would be altered by this fix. I assumed that the
lack of a datalayout in those regression files is an oversight, so
I added the minimal layout (make i32 legal) necessary to preserve
behavior on those tests.
Differential Revision: https://reviews.llvm.org/D73907
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
0 files changed, 0 insertions, 0 deletions