Add a placeholder legality rule for AMDGPU until the rest of the
actions are handled.
Details
Diff Detail
Event Timeline
Looks fine but can be simplified.
llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp | ||
---|---|---|
1644–1645 | This isn't needed if you make the changes below. | |
1660–1663 | These can both be anyext. | |
1671 | There's no need to make this conditional on IsSigned if we're just about to truncate anyway. | |
llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp | ||
1431 | "selectively" |
llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp | ||
---|---|---|
1671 | How else would I know whether to prefer ashr or lshr? |
llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp | ||
---|---|---|
1671 | Why would it make any difference? Can't you just pick one arbitrarily? |
llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp | ||
---|---|---|
1671 | First I don't know whether the target has a reason to prefer one over the other. I also would assume using the right shift to preserve the expected number of sign bits for the signed result would be more useful for downstream simplifications once the trunc is folded out |
llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp | ||
---|---|---|
1671 | OK, I won't object if you want to leave it like that. The other comment about anyext still stands. |
This isn't needed if you make the changes below.