[PATCH] D26265: AMDGPU: Remove unnecessary and on conditional branch

Nicolai Hähnle via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 3 07:17:25 PDT 2016


nhaehnle requested changes to this revision.
nhaehnle added a reviewer: nhaehnle.
nhaehnle added a comment.
This revision now requires changes to proceed.

I'm pretty sure this can lead to problems with more complicated conditionals, or at least it once could have done so.

The comment was definitely wrong, v_cmp returns a mask that is & EXEC, but the concern I have is when the condition is some boolean combination of conditions instead of coming straight out of v_cmp. For example, we translate a logical negation to simply XOR with ~0 instead of XOR with EXEC (for good reasons, because the condition may have been computed in a different basic block, but still...). In theory negations can always be folded away by a compination of DeMorgan and inverting the v_cmps, but I'm not sure that that always happens.


https://reviews.llvm.org/D26265





More information about the llvm-commits mailing list