summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorChristian Konig <christian.koenig@amd.com>2013-03-26 14:03:44 +0000
committerChristian Konig <christian.koenig@amd.com>2013-03-26 14:03:44 +0000
commit6a9d390b6b814d97a69c5d6276c149966cd9f08c (patch)
tree38c49973d8460d81ce196d7fd3d6934a45be0f9a /llvm/lib/Target
parentf686be46742733054a6caa75884e4571e8cf4b61 (diff)
downloadbcm5719-llvm-6a9d390b6b814d97a69c5d6276c149966cd9f08c.tar.gz
bcm5719-llvm-6a9d390b6b814d97a69c5d6276c149966cd9f08c.zip
R600/SI: fix ELSE pseudo op handling
Restore the EXEC mask early, otherwise a copy might end up not beeing executed. Candidate for the mesa stable branch. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Tested-by: Michel Dänzer <michel.daenzer@amd.com> llvm-svn: 178018
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/R600/SILowerControlFlow.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/R600/SILowerControlFlow.cpp b/llvm/lib/Target/R600/SILowerControlFlow.cpp
index 9a027e77eb6..6b3f6261dfa 100644
--- a/llvm/lib/Target/R600/SILowerControlFlow.cpp
+++ b/llvm/lib/Target/R600/SILowerControlFlow.cpp
@@ -197,7 +197,8 @@ void SILowerControlFlowPass::Else(MachineInstr &MI) {
unsigned Dst = MI.getOperand(0).getReg();
unsigned Src = MI.getOperand(1).getReg();
- BuildMI(MBB, &MI, DL, TII->get(AMDGPU::S_OR_SAVEEXEC_B64), Dst)
+ BuildMI(MBB, MBB.getFirstNonPHI(), DL,
+ TII->get(AMDGPU::S_OR_SAVEEXEC_B64), Dst)
.addReg(Src); // Saved EXEC
BuildMI(MBB, &MI, DL, TII->get(AMDGPU::S_XOR_B64), AMDGPU::EXEC)
OpenPOWER on IntegriCloud