[AMDGPU] Improve abs modifier usage
If a call to the llvm.fabs intrinsic has users in another reachable BB, SelectionDAG will not apply the abs modifier to these users and instead generate a v_and ..., 0x7fffffff instruction. For fneg instructions, the issue is similar. This patch implements `AMDGPUIselLowering::shouldSinkOperands`, which allows CodegenPrepare to call `tryToSinkFreeOperands`. Reviewed By: foad Differential Revision: https://reviews.llvm.org/D150347
Loading
Please sign in to comment