AMDGPU: Try to push fneg as integer into select
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 23 Jan 2023 19:42:59 +0000 (15:42 -0400)
committerMatt Arsenault <arsenm2@gmail.com>
Sun, 5 Mar 2023 22:53:16 +0000 (18:53 -0400)
commitbd1f7c417fc04f93de6b7bbf8740351e58a90613
tree366dd27a4c5514d1420d9976b455ea08aedb2285
parentf5e9c1ae8306dec95d85febab658de86a2e74a1d
AMDGPU: Try to push fneg as integer into select

I initially attempted to select the source modifier from xor of
a sign mask. This proved to be more difficult since
foldBinOpIntoSelect does not consider free fneg of integers
and undoes the combine.
llvm/lib/Target/AMDGPU/SIISelLowering.cpp
llvm/test/CodeGen/AMDGPU/fneg-modifier-casting.ll