diff options
author | Craig Topper <craig.topper@intel.com> | 2018-12-05 03:41:26 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@intel.com> | 2018-12-05 03:41:26 +0000 |
commit | 6934202dc04ffa5ff336a1cca9ace8dae44c29d4 (patch) | |
tree | eb27ba728f0db9dc2aa6f69e0af4331cb783083a /llvm/test/CodeGen/AMDGPU/infinite-loop.ll | |
parent | b9601a385afe20ffacf23a15baf6be5aeb549684 (diff) | |
download | bcm5719-llvm-6934202dc04ffa5ff336a1cca9ace8dae44c29d4.tar.gz bcm5719-llvm-6934202dc04ffa5ff336a1cca9ace8dae44c29d4.zip |
[MachineLICM][X86][AMDGPU] Fix subtle bug in the updating of PhysRegClobbers in post-RA LICM
It looks like MCRegAliasIterator can visit the same physical register twice. When this happens in this code in LICM we end up setting the PhysRegDef and then later in the same loop visit the register again. Now we see that PhysRegDef is set from the earlier iteration so now set PhysRegClobber.
This patch splits the loop so we have one that uses the previous value of PhysRegDef to update PhysRegClobber and second loop that updates PhysRegDef.
The X86 atomic test is an improvement. I had to add sideeffect to the two shrink wrapping tests to prevent hoisting from occurring. I'm not sure about the AMDGPU tests. It looks like the branch instruction changed at end the of the loops. And in the branch-relaxation test I think there is now "and vcc, exec, -1" instruction that wasn't there before.
Differential Revision: https://reviews.llvm.org/D55102
llvm-svn: 348330
Diffstat (limited to 'llvm/test/CodeGen/AMDGPU/infinite-loop.ll')
-rw-r--r-- | llvm/test/CodeGen/AMDGPU/infinite-loop.ll | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/test/CodeGen/AMDGPU/infinite-loop.ll b/llvm/test/CodeGen/AMDGPU/infinite-loop.ll index e265f5ca4ea..75ad58df43b 100644 --- a/llvm/test/CodeGen/AMDGPU/infinite-loop.ll +++ b/llvm/test/CodeGen/AMDGPU/infinite-loop.ll @@ -32,11 +32,11 @@ loop: ; SI: s_cbranch_execz [[RET:BB[0-9]+_[0-9]+]] ; SI: v_mov_b32_e32 [[REG:v[0-9]+]], 0x3e7 -; SI: [[LOOP:BB[0-9]+_[0-9]+]]: ; %loop ; SI: s_and_b64 vcc, exec, -1 +; SI: [[LOOP:BB[0-9]+_[0-9]+]]: ; %loop ; SI: s_waitcnt lgkmcnt(0) ; SI: buffer_store_dword [[REG]] -; SI: s_cbranch_execnz [[LOOP]] +; SI: s_cbranch_vccnz [[LOOP]] ; SI: [[RET]]: ; %UnifiedReturnBlock ; SI: s_endpgm |