forked from OSchip/llvm-project
[Test][NFC] Add a new test to verify if scheduler can cluster two ld/st
even with different preds
This commit is contained in:
parent
13080ca1f0
commit
9b32ef9413
|
@ -213,3 +213,28 @@ entry:
|
|||
store i32 %add, i32* %arrayidx1, align 4
|
||||
ret void
|
||||
}
|
||||
|
||||
; FIXME - The SU(4) and SU(7) can be clustered even with
|
||||
; different preds
|
||||
; CHECK: ********** MI Scheduling **********
|
||||
; CHECK-LABEL: cluster_with_different_preds:%bb.0
|
||||
; CHECK-NOT:Cluster ld/st SU(4) - SU(7)
|
||||
; CHECK:SU(3): STRWui %2:gpr32, %0:gpr64common, 0 ::
|
||||
; CHECK:SU(4): %3:gpr32 = LDRWui %1:gpr64common, 0 ::
|
||||
; CHECK:Predecessors:
|
||||
; CHECK: SU(3): Ord Latency=1 Memory
|
||||
; CHECK:SU(6): STRBBui %4:gpr32, %1:gpr64common, 4 ::
|
||||
; CHECK:SU(7): %5:gpr32 = LDRWui %1:gpr64common, 1 ::
|
||||
; CHECK:Predecessors:
|
||||
; CHECK:SU(6): Ord Latency=1 Memory
|
||||
define i32 @cluster_with_different_preds(i32* %p, i32* %q) {
|
||||
entry:
|
||||
store i32 3, i32* %p, align 4
|
||||
%0 = load i32, i32* %q, align 4
|
||||
%add.ptr = getelementptr inbounds i32, i32* %q, i64 1
|
||||
%1 = bitcast i32* %add.ptr to i8*
|
||||
store i8 5, i8* %1, align 1
|
||||
%2 = load i32, i32* %add.ptr, align 4
|
||||
%add = add nsw i32 %2, %0
|
||||
ret i32 %add
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue