[all-commits] [llvm/llvm-project] 0cf0be: [InstCombine] fix operands of shouldChangeType() f...
RotateRight via All-commits
all-commits at lists.llvm.org
Tue Feb 4 04:49:57 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 0cf0be993c382f15c277de6d0db8be6a236c7c50
https://github.com/llvm/llvm-project/commit/0cf0be993c382f15c277de6d0db8be6a236c7c50
Author: Sanjay Patel <spatel at rotateright.com>
Date: 2020-02-04 (Tue, 04 Feb 2020)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
M llvm/test/CodeGen/AMDGPU/diverge-switch-default.ll
M llvm/test/CodeGen/AMDGPU/reqd-work-group-size.ll
M llvm/test/Transforms/InstCombine/cast_phi.ll
M llvm/test/Transforms/InstCombine/icmp-div-constant.ll
M llvm/test/Transforms/InstCombine/icmp-mul-zext.ll
Log Message:
-----------
[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
More information about the All-commits
mailing list