[AMDGPU] Expand not pattern according to the XOR node divergence
authoralex-t <alexander.timofeev@amd.com>
Thu, 16 Dec 2021 17:00:49 +0000 (20:00 +0300)
committeralex-t <alexander.timofeev@amd.com>
Mon, 20 Dec 2021 11:41:38 +0000 (14:41 +0300)
commit1448aa9dbdd9e3e194486bc8fbfe2ed4e480217b
treea4de4a8259a15f17f8b1e4f7f726f4659fc2beac
parent35870c442210b885391926f6ae8546beba70906f
[AMDGPU] Expand not pattern according to the XOR node divergence

The "not" is defined as XOR $src -1.
 We need to transform this pattern to either S_NOT_B32 or V_NOT_B32_e32
 dependent on the "xor" node divergence.

Reviewed By: rampitec, foad

Differential Revision: https://reviews.llvm.org/D115884
llvm/lib/Target/AMDGPU/SIInstructions.td
llvm/lib/Target/AMDGPU/SOPInstructions.td
llvm/test/CodeGen/AMDGPU/divergence-driven-not-isel.ll [new file with mode: 0644]
llvm/test/CodeGen/AMDGPU/fused-bitlogic.ll
llvm/test/CodeGen/AMDGPU/llvm.round.f64.ll
llvm/test/CodeGen/AMDGPU/urem64.ll