OSDN Git Service

[AMDGPU] Translate s_and/s_andn2 to s_mov in vcc optimisation
authorCarl Ritson <carl.ritson@amd.com>
Fri, 17 Jul 2020 02:12:12 +0000 (11:12 +0900)
committerCarl Ritson <carl.ritson@amd.com>
Fri, 17 Jul 2020 02:48:57 +0000 (11:48 +0900)
commit3a18665748342d8a55c3000dcc2c444ba1de2049
tree3543a448928b81b9665a151bf1b2e1bbf3b771f7
parentb128f719a4c826e8f723eaa9b42b607c81f563a5
[AMDGPU] Translate s_and/s_andn2 to s_mov in vcc optimisation

When SCC is dead, but VCC is required then replace s_and / s_andn2
with s_mov into VCC when mask value is 0 or -1.

Reviewed By: rampitec

Differential Revision: https://reviews.llvm.org/D83850
llvm/lib/Target/AMDGPU/SIPreEmitPeephole.cpp
llvm/test/CodeGen/AMDGPU/infinite-loop.ll
llvm/test/CodeGen/AMDGPU/insert-skip-from-vcc.mir
llvm/test/CodeGen/AMDGPU/wave32.ll