]> granicus.if.org Git - llvm/commit
GlobalISel: Use the original flags when lowering fneg to fsub
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 17 Jun 2019 23:48:43 +0000 (23:48 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 17 Jun 2019 23:48:43 +0000 (23:48 +0000)
commite14caa73dc2848435b88cd931cb6ed8449951dba
tree99a9fdb1363c6fb14af1651237a27f39df7ca3ee
parent644422a4d3f3afaeec80f0183065af9cb894411d
GlobalISel: Use the original flags when lowering fneg to fsub

This was ignoring the flag on fneg, and using the source instruction's
flags. Also fixes tests missing from r358702.

Note the expansion itself isn't correct without nnan, but that should
be fixed separately.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363637 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/GlobalISel/LegalizerHelper.cpp
test/CodeGen/AMDGPU/GlobalISel/irtranslator-fast-math-flags.ll [new file with mode: 0644]
test/CodeGen/AMDGPU/GlobalISel/legalize-fsub.mir
unittests/CodeGen/GlobalISel/LegalizerHelperTest.cpp