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.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/AMDGPU/SIInstructions.td | ||
---|---|---|
2120 | There are already patterns on the definitions of S_NOT_* in SOPInstructions.td. Can you update those, instead of adding new standalone patterns? |
llvm/lib/Target/AMDGPU/SIInstructions.td | ||
---|---|---|
2120 | +1. |
llvm/lib/Target/AMDGPU/SIInstructions.td | ||
---|---|---|
2120 | The pattern in SOPInstructions.td works with the explicit "not" PatFrag. What if there is no "not" but the "xor src, -1" that was produced by the earlier DAG transformations? |
llvm/lib/Target/AMDGPU/SIInstructions.td | ||
---|---|---|
2120 | 'not' is not a separate DAG node, it is just a named pattern that matches an xor with -1. |
llvm/lib/Target/AMDGPU/SIInstructions.td | ||
---|---|---|
2120 | Ah... yes. :) "not" is a PatFrag so it is always considered as "not" during selection. |
Uniform XOR src, -1 pattern removed and existing S_NOT_B32/64 patterns equipped with the divergence predicates
There are already patterns on the definitions of S_NOT_* in SOPInstructions.td. Can you update those, instead of adding new standalone patterns?