]> granicus.if.org Git - llvm/commit
AMDGPU: Keep track of modifiers when converting v_mac to v_mad
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Sat, 11 Mar 2017 05:40:40 +0000 (05:40 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Sat, 11 Mar 2017 05:40:40 +0000 (05:40 +0000)
commitdbe625a3115729f5ca56d20c3a4447c0760ac9d8
tree2f6141765c732ce31ccdf572d5a699770b7e67de
parentcef724571c64f2acc9716c96e5a3b8c3e29517cb
AMDGPU: Keep track of modifiers when converting v_mac to v_mad

Since v_max_f32_e64/v_max_f16_e64 can be folded if the target
instruction supports the clamp bit, we also need to maintain
modifiers when converting v_mac to v_mad.

This fixes a rendering issue with Dirt Rally because a v_mac
instruction with the clamp bit set was converted to a v_mad
but that bit was lost during the conversion.

Fixes: e184e01dd79 ("AMDGPU: Fold FP clamp as modifier bit")
Patch by Samuel Pitoiset <samuel.pitoiset@gmail.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297556 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AMDGPU/SIInstrInfo.cpp
test/CodeGen/AMDGPU/clamp-modifier.ll
test/CodeGen/AMDGPU/omod.ll