mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-11 13:37:07 +00:00
SCCP: update for cmpxchg returning { iN, i1 } now.
I accidentally missed this one since its use looked OK locally. llvm-svn: 210909
This commit is contained in:
parent
4cfd6b9828
commit
d7c66da372
@ -494,7 +494,9 @@ private:
|
||||
void visitResumeInst (TerminatorInst &I) { /*returns void*/ }
|
||||
void visitUnreachableInst(TerminatorInst &I) { /*returns void*/ }
|
||||
void visitFenceInst (FenceInst &I) { /*returns void*/ }
|
||||
void visitAtomicCmpXchgInst (AtomicCmpXchgInst &I) { markOverdefined(&I); }
|
||||
void visitAtomicCmpXchgInst(AtomicCmpXchgInst &I) {
|
||||
markAnythingOverdefined(&I);
|
||||
}
|
||||
void visitAtomicRMWInst (AtomicRMWInst &I) { markOverdefined(&I); }
|
||||
void visitAllocaInst (Instruction &I) { markOverdefined(&I); }
|
||||
void visitVAArgInst (Instruction &I) { markAnythingOverdefined(&I); }
|
||||
|
9
test/Transforms/SCCP/atomic.ll
Normal file
9
test/Transforms/SCCP/atomic.ll
Normal file
@ -0,0 +1,9 @@
|
||||
; RUN: opt < %s -sccp -S | FileCheck %s
|
||||
|
||||
define i1 @test_cmpxchg(i32* %addr, i32 %desired, i32 %new) {
|
||||
; CHECK-LABEL: @test_cmpxchg
|
||||
; CHECK: cmpxchg i32* %addr, i32 %desired, i32 %new seq_cst seq_cst
|
||||
%val = cmpxchg i32* %addr, i32 %desired, i32 %new seq_cst seq_cst
|
||||
%res = extractvalue { i32, i1 } %val, 1
|
||||
ret i1 %res
|
||||
}
|
Loading…
Reference in New Issue
Block a user