This is worse if the original constant is an inline immediate.
This should also be done for 64-bit adds, but requires fixing
operand folding bugs first.
Paths
| Differential D28043
AMDGPU: Undo sub x, c -> add x, -c canonicalization ClosedPublic Authored by arsenm on Dec 21 2016, 6:52 PM.
Details
Summary This is worse if the original constant is an inline immediate. This should also be done for 64-bit adds, but requires fixing
Diff Detail Event Timelinearsenm updated this object. This revision is now accepted and ready to land.Jan 11 2017, 1:04 PM
Revision Contents
Diff 82303 lib/Target/AMDGPU/SIInstrInfo.td
lib/Target/AMDGPU/SIInstructions.td
lib/Target/AMDGPU/VOP2Instructions.td
test/CodeGen/AMDGPU/s_addk_i32.ll
test/CodeGen/AMDGPU/shrink-add-sub-constant.ll
|