[PATCH] D22748: AMDGPU: override shouldNormalizeToSelectSequence

Nicolai Hähnle via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 27 06:59:35 PDT 2016


nhaehnle added a comment.

Yes. With shouldNormalizeToSelectSequence = false, the test cases generate

v_cmp
v_cmp
s_and/s_or
v_cndmask

With shouldNormalizeToSelectSequence = true (ie., the default), they generate

v_cmp
v_cmp
v_cndmask
v_cndmask

setHasMultipleConditionRegisters doesn't make a difference.

I believe the first sequence is better, since we usually don't use many SALU instructions, and the s_and/s_or gives us a better balance between SALU and VALU. But of course that only applies when the select operates on VGPRs...


https://reviews.llvm.org/D22748





More information about the llvm-commits mailing list