5 Commits

Author SHA1 Message Date
Jay Foad
f2c164c815 [AMDGPU] Do not wait for vscnt on function entry and return
SIInsertWaitcnts inserts waitcnt instructions to resolve data
dependencies. The GFX10+ vscnt (VMEM store count) counter is never used
in this way. It is only used to resolve memory dependencies, and that is
handled by SIMemoryLegalizer. Hence there is no need to conservatively
wait for vscnt to be 0 on function entry and before returns.

Differential Revision: https://reviews.llvm.org/D153537
2023-07-04 12:22:38 +01:00
Thomas Symalla
91a7aa4c9b [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
2023-05-19 12:02:21 +02:00
Thomas Symalla
d262a11a38 [NFC][AMDGPU] Pre-commit test. 2023-05-11 09:44:12 +02:00
Thomas Symalla
60a4cb7076 [NFC][AMDGPU] Add option to test. 2023-05-09 17:24:00 +02:00
Thomas Symalla
80f442e1ed [NFC][AMDGPU] Pre-commit test.
Pre-commit fold-fabs.ll.
2023-05-09 14:53:44 +02:00