; CHECK-NEXT: .LBB3_1: # %entry
; CHECK-NEXT: #
; CHECK-NEXT: lbarx 7, 0, 0
-; CHECK-NEXT: cmpw 5, 7
+; CHECK-NEXT: cmpw 7, 5
; CHECK-NEXT: bne 0, .LBB3_3
; CHECK-NEXT: # %bb.2: # %entry
; CHECK-NEXT: #
; CHECK-NEXT: stbcx. 8, 0, 0
; CHECK-NEXT: bne 0, .LBB3_1
-; CHECK-NEXT: b .LBB3_4
; CHECK-NEXT: .LBB3_3: # %entry
-; CHECK-NEXT: stbcx. 7, 0, 0
-; CHECK-NEXT: .LBB3_4: # %entry
; CHECK-NEXT: lwsync
; CHECK-NEXT: stb 7, sc@toc@l(4)
; CHECK-NEXT: lbz 8, uc@toc@l(3)
; CHECK-NEXT: sync
-; CHECK-NEXT: .LBB3_5: # %entry
+; CHECK-NEXT: .LBB3_4: # %entry
; CHECK-NEXT: #
; CHECK-NEXT: lbarx 5, 0, 6
-; CHECK-NEXT: cmpw 8, 5
-; CHECK-NEXT: bne 0, .LBB3_7
-; CHECK-NEXT: # %bb.6: # %entry
+; CHECK-NEXT: cmpw 5, 8
+; CHECK-NEXT: bne 0, .LBB3_6
+; CHECK-NEXT: # %bb.5: # %entry
; CHECK-NEXT: #
; CHECK-NEXT: stbcx. 7, 0, 6
-; CHECK-NEXT: bne 0, .LBB3_5
-; CHECK-NEXT: b .LBB3_8
-; CHECK-NEXT: .LBB3_7: # %entry
-; CHECK-NEXT: stbcx. 5, 0, 6
-; CHECK-NEXT: .LBB3_8: # %entry
+; CHECK-NEXT: bne 0, .LBB3_4
+; CHECK-NEXT: .LBB3_6: # %entry
; CHECK-NEXT: lwsync
; CHECK-NEXT: addis 7, 2, ss@toc@ha
; CHECK-NEXT: stb 5, uc@toc@l(3)
; CHECK-NEXT: lbz 8, sc@toc@l(4)
; CHECK-NEXT: addi 12, 7, ss@toc@l
; CHECK-NEXT: sync
-; CHECK-NEXT: extsb 9, 8
-; CHECK-NEXT: .LBB3_9: # %entry
-; CHECK-NEXT: #
-; CHECK-NEXT: lharx 8, 0, 12
-; CHECK-NEXT: cmpw 5, 8
-; CHECK-NEXT: bne 0, .LBB3_11
-; CHECK-NEXT: # %bb.10: # %entry
+; CHECK-NEXT: extsb 8, 8
+; CHECK-NEXT: .LBB3_7: # %entry
; CHECK-NEXT: #
-; CHECK-NEXT: sthcx. 9, 0, 12
+; CHECK-NEXT: lharx 9, 0, 12
+; CHECK-NEXT: cmpw 9, 5
; CHECK-NEXT: bne 0, .LBB3_9
-; CHECK-NEXT: b .LBB3_12
-; CHECK-NEXT: .LBB3_11: # %entry
+; CHECK-NEXT: # %bb.8: # %entry
+; CHECK-NEXT: #
; CHECK-NEXT: sthcx. 8, 0, 12
-; CHECK-NEXT: .LBB3_12: # %entry
+; CHECK-NEXT: bne 0, .LBB3_7
+; CHECK-NEXT: .LBB3_9: # %entry
; CHECK-NEXT: lwsync
-; CHECK-NEXT: sth 8, ss@toc@l(7)
-; CHECK-NEXT: addis 5, 2, us@toc@ha
+; CHECK-NEXT: sth 9, ss@toc@l(7)
+; CHECK-NEXT: addis 7, 2, us@toc@ha
; CHECK-NEXT: lbz 8, sc@toc@l(4)
-; CHECK-NEXT: lbz 7, uc@toc@l(3)
-; CHECK-NEXT: addi 11, 5, us@toc@l
+; CHECK-NEXT: lbz 5, uc@toc@l(3)
+; CHECK-NEXT: addi 11, 7, us@toc@l
; CHECK-NEXT: sync
-; CHECK-NEXT: extsb 9, 8
-; CHECK-NEXT: .LBB3_13: # %entry
+; CHECK-NEXT: extsb 8, 8
+; CHECK-NEXT: .LBB3_10: # %entry
; CHECK-NEXT: #
-; CHECK-NEXT: lharx 8, 0, 11
-; CHECK-NEXT: cmpw 7, 8
-; CHECK-NEXT: bne 0, .LBB3_15
-; CHECK-NEXT: # %bb.14: # %entry
+; CHECK-NEXT: lharx 9, 0, 11
+; CHECK-NEXT: cmpw 9, 5
+; CHECK-NEXT: bne 0, .LBB3_12
+; CHECK-NEXT: # %bb.11: # %entry
; CHECK-NEXT: #
-; CHECK-NEXT: sthcx. 9, 0, 11
-; CHECK-NEXT: bne 0, .LBB3_13
-; CHECK-NEXT: b .LBB3_16
-; CHECK-NEXT: .LBB3_15: # %entry
; CHECK-NEXT: sthcx. 8, 0, 11
-; CHECK-NEXT: .LBB3_16: # %entry
+; CHECK-NEXT: bne 0, .LBB3_10
+; CHECK-NEXT: .LBB3_12: # %entry
; CHECK-NEXT: lwsync
-; CHECK-NEXT: sth 8, us@toc@l(5)
-; CHECK-NEXT: addis 5, 2, si@toc@ha
+; CHECK-NEXT: sth 9, us@toc@l(7)
+; CHECK-NEXT: addis 7, 2, si@toc@ha
; CHECK-NEXT: lbz 8, sc@toc@l(4)
-; CHECK-NEXT: lbz 7, uc@toc@l(3)
-; CHECK-NEXT: addi 10, 5, si@toc@l
+; CHECK-NEXT: lbz 5, uc@toc@l(3)
+; CHECK-NEXT: addi 10, 7, si@toc@l
; CHECK-NEXT: sync
-; CHECK-NEXT: extsb 9, 8
-; CHECK-NEXT: .LBB3_17: # %entry
+; CHECK-NEXT: extsb 8, 8
+; CHECK-NEXT: .LBB3_13: # %entry
; CHECK-NEXT: #
-; CHECK-NEXT: lwarx 8, 0, 10
-; CHECK-NEXT: cmpw 7, 8
-; CHECK-NEXT: bne 0, .LBB3_19
-; CHECK-NEXT: # %bb.18: # %entry
+; CHECK-NEXT: lwarx 9, 0, 10
+; CHECK-NEXT: cmpw 9, 5
+; CHECK-NEXT: bne 0, .LBB3_15
+; CHECK-NEXT: # %bb.14: # %entry
; CHECK-NEXT: #
-; CHECK-NEXT: stwcx. 9, 0, 10
-; CHECK-NEXT: bne 0, .LBB3_17
-; CHECK-NEXT: b .LBB3_20
-; CHECK-NEXT: .LBB3_19: # %entry
; CHECK-NEXT: stwcx. 8, 0, 10
-; CHECK-NEXT: .LBB3_20: # %entry
+; CHECK-NEXT: bne 0, .LBB3_13
+; CHECK-NEXT: .LBB3_15: # %entry
; CHECK-NEXT: lwsync
-; CHECK-NEXT: stw 8, si@toc@l(5)
+; CHECK-NEXT: stw 9, si@toc@l(7)
; CHECK-NEXT: addis 5, 2, ui@toc@ha
; CHECK-NEXT: lbz 8, sc@toc@l(4)
; CHECK-NEXT: lbz 7, uc@toc@l(3)
; CHECK-NEXT: addi 9, 5, ui@toc@l
; CHECK-NEXT: sync
-; CHECK-NEXT: extsb 30, 8
-; CHECK-NEXT: .LBB3_21: # %entry
+; CHECK-NEXT: extsb 8, 8
+; CHECK-NEXT: .LBB3_16: # %entry
; CHECK-NEXT: #
-; CHECK-NEXT: lwarx 8, 0, 9
-; CHECK-NEXT: cmpw 7, 8
-; CHECK-NEXT: bne 0, .LBB3_23
-; CHECK-NEXT: # %bb.22: # %entry
+; CHECK-NEXT: lwarx 30, 0, 9
+; CHECK-NEXT: cmpw 30, 7
+; CHECK-NEXT: bne 0, .LBB3_18
+; CHECK-NEXT: # %bb.17: # %entry
; CHECK-NEXT: #
-; CHECK-NEXT: stwcx. 30, 0, 9
-; CHECK-NEXT: bne 0, .LBB3_21
-; CHECK-NEXT: b .LBB3_24
-; CHECK-NEXT: .LBB3_23: # %entry
; CHECK-NEXT: stwcx. 8, 0, 9
-; CHECK-NEXT: .LBB3_24: # %entry
+; CHECK-NEXT: bne 0, .LBB3_16
+; CHECK-NEXT: .LBB3_18: # %entry
; CHECK-NEXT: lwsync
-; CHECK-NEXT: stw 8, ui@toc@l(5)
-; CHECK-NEXT: addis 7, 2, sll@toc@ha
+; CHECK-NEXT: stw 30, ui@toc@l(5)
+; CHECK-NEXT: addis 30, 2, sll@toc@ha
; CHECK-NEXT: lbz 8, sc@toc@l(4)
-; CHECK-NEXT: lbz 30, uc@toc@l(3)
+; CHECK-NEXT: lbz 7, uc@toc@l(3)
; CHECK-NEXT: sync
-; CHECK-NEXT: extsb 28, 8
-; CHECK-NEXT: addi 8, 7, sll@toc@l
-; CHECK-NEXT: .LBB3_25: # %entry
+; CHECK-NEXT: extsb 29, 8
+; CHECK-NEXT: addi 8, 30, sll@toc@l
+; CHECK-NEXT: .LBB3_19: # %entry
; CHECK-NEXT: #
-; CHECK-NEXT: ldarx 29, 0, 8
-; CHECK-NEXT: cmpd 30, 29
-; CHECK-NEXT: bne 0, .LBB3_27
-; CHECK-NEXT: # %bb.26: # %entry
+; CHECK-NEXT: ldarx 28, 0, 8
+; CHECK-NEXT: cmpd 28, 7
+; CHECK-NEXT: bne 0, .LBB3_21
+; CHECK-NEXT: # %bb.20: # %entry
; CHECK-NEXT: #
-; CHECK-NEXT: stdcx. 28, 0, 8
-; CHECK-NEXT: bne 0, .LBB3_25
-; CHECK-NEXT: b .LBB3_28
-; CHECK-NEXT: .LBB3_27: # %entry
; CHECK-NEXT: stdcx. 29, 0, 8
-; CHECK-NEXT: .LBB3_28: # %entry
+; CHECK-NEXT: bne 0, .LBB3_19
+; CHECK-NEXT: .LBB3_21: # %entry
; CHECK-NEXT: lwsync
-; CHECK-NEXT: std 29, sll@toc@l(7)
-; CHECK-NEXT: addis 30, 2, ull@toc@ha
+; CHECK-NEXT: std 28, sll@toc@l(30)
+; CHECK-NEXT: addis 29, 2, ull@toc@ha
; CHECK-NEXT: lbz 7, sc@toc@l(4)
-; CHECK-NEXT: lbz 29, uc@toc@l(3)
+; CHECK-NEXT: lbz 30, uc@toc@l(3)
; CHECK-NEXT: sync
-; CHECK-NEXT: extsb 27, 7
-; CHECK-NEXT: addi 7, 30, ull@toc@l
-; CHECK-NEXT: .LBB3_29: # %entry
+; CHECK-NEXT: extsb 28, 7
+; CHECK-NEXT: addi 7, 29, ull@toc@l
+; CHECK-NEXT: .LBB3_22: # %entry
; CHECK-NEXT: #
-; CHECK-NEXT: ldarx 28, 0, 7
-; CHECK-NEXT: cmpd 29, 28
-; CHECK-NEXT: bne 0, .LBB3_31
-; CHECK-NEXT: # %bb.30: # %entry
+; CHECK-NEXT: ldarx 27, 0, 7
+; CHECK-NEXT: cmpd 27, 30
+; CHECK-NEXT: bne 0, .LBB3_24
+; CHECK-NEXT: # %bb.23: # %entry
; CHECK-NEXT: #
-; CHECK-NEXT: stdcx. 27, 0, 7
-; CHECK-NEXT: bne 0, .LBB3_29
-; CHECK-NEXT: b .LBB3_32
-; CHECK-NEXT: .LBB3_31: # %entry
; CHECK-NEXT: stdcx. 28, 0, 7
-; CHECK-NEXT: .LBB3_32: # %entry
+; CHECK-NEXT: bne 0, .LBB3_22
+; CHECK-NEXT: .LBB3_24: # %entry
; CHECK-NEXT: lwsync
-; CHECK-NEXT: std 28, ull@toc@l(30)
+; CHECK-NEXT: std 27, ull@toc@l(29)
; CHECK-NEXT: lbz 30, uc@toc@l(3)
-; CHECK-NEXT: lbz 28, sc@toc@l(4)
+; CHECK-NEXT: lbz 29, sc@toc@l(4)
; CHECK-NEXT: sync
-; CHECK-NEXT: .LBB3_33: # %entry
+; CHECK-NEXT: .LBB3_25: # %entry
; CHECK-NEXT: #
-; CHECK-NEXT: lbarx 29, 0, 0
-; CHECK-NEXT: cmpw 30, 29
-; CHECK-NEXT: bne 0, .LBB3_35
-; CHECK-NEXT: # %bb.34: # %entry
+; CHECK-NEXT: lbarx 28, 0, 0
+; CHECK-NEXT: cmpw 28, 30
+; CHECK-NEXT: bne 0, .LBB3_27
+; CHECK-NEXT: # %bb.26: # %entry
; CHECK-NEXT: #
-; CHECK-NEXT: stbcx. 28, 0, 0
-; CHECK-NEXT: bne 0, .LBB3_33
-; CHECK-NEXT: b .LBB3_36
-; CHECK-NEXT: .LBB3_35: # %entry
; CHECK-NEXT: stbcx. 29, 0, 0
-; CHECK-NEXT: .LBB3_36: # %entry
-; CHECK-NEXT: xor 0, 29, 30
+; CHECK-NEXT: bne 0, .LBB3_25
+; CHECK-NEXT: .LBB3_27: # %entry
+; CHECK-NEXT: xor 0, 28, 30
; CHECK-NEXT: lwsync
; CHECK-NEXT: cntlzw 0, 0
-; CHECK-NEXT: lbz 29, sc@toc@l(4)
+; CHECK-NEXT: lbz 30, sc@toc@l(4)
; CHECK-NEXT: srwi 0, 0, 5
; CHECK-NEXT: stw 0, ui@toc@l(5)
; CHECK-NEXT: lbz 0, uc@toc@l(3)
; CHECK-NEXT: sync
-; CHECK-NEXT: .LBB3_37: # %entry
+; CHECK-NEXT: .LBB3_28: # %entry
; CHECK-NEXT: #
-; CHECK-NEXT: lbarx 30, 0, 6
-; CHECK-NEXT: cmpw 0, 30
-; CHECK-NEXT: bne 0, .LBB3_39
-; CHECK-NEXT: # %bb.38: # %entry
+; CHECK-NEXT: lbarx 29, 0, 6
+; CHECK-NEXT: cmpw 29, 0
+; CHECK-NEXT: bne 0, .LBB3_30
+; CHECK-NEXT: # %bb.29: # %entry
; CHECK-NEXT: #
-; CHECK-NEXT: stbcx. 29, 0, 6
-; CHECK-NEXT: bne 0, .LBB3_37
-; CHECK-NEXT: b .LBB3_40
-; CHECK-NEXT: .LBB3_39: # %entry
; CHECK-NEXT: stbcx. 30, 0, 6
-; CHECK-NEXT: .LBB3_40: # %entry
-; CHECK-NEXT: xor 6, 30, 0
+; CHECK-NEXT: bne 0, .LBB3_28
+; CHECK-NEXT: .LBB3_30: # %entry
+; CHECK-NEXT: xor 6, 29, 0
; CHECK-NEXT: lwsync
; CHECK-NEXT: cntlzw 6, 6
; CHECK-NEXT: lbz 0, sc@toc@l(4)
; CHECK-NEXT: srwi 6, 6, 5
; CHECK-NEXT: stw 6, ui@toc@l(5)
; CHECK-NEXT: lbz 6, uc@toc@l(3)
-; CHECK-NEXT: extsb 30, 0
+; CHECK-NEXT: extsb 0, 0
; CHECK-NEXT: sync
-; CHECK-NEXT: .LBB3_41: # %entry
+; CHECK-NEXT: .LBB3_31: # %entry
; CHECK-NEXT: #
-; CHECK-NEXT: lharx 0, 0, 12
-; CHECK-NEXT: cmpw 6, 0
-; CHECK-NEXT: bne 0, .LBB3_43
-; CHECK-NEXT: # %bb.42: # %entry
+; CHECK-NEXT: lharx 30, 0, 12
+; CHECK-NEXT: cmpw 30, 6
+; CHECK-NEXT: bne 0, .LBB3_33
+; CHECK-NEXT: # %bb.32: # %entry
; CHECK-NEXT: #
-; CHECK-NEXT: sthcx. 30, 0, 12
-; CHECK-NEXT: bne 0, .LBB3_41
-; CHECK-NEXT: b .LBB3_44
-; CHECK-NEXT: .LBB3_43: # %entry
; CHECK-NEXT: sthcx. 0, 0, 12
-; CHECK-NEXT: .LBB3_44: # %entry
-; CHECK-NEXT: xor 6, 0, 6
+; CHECK-NEXT: bne 0, .LBB3_31
+; CHECK-NEXT: .LBB3_33: # %entry
+; CHECK-NEXT: xor 6, 30, 6
; CHECK-NEXT: lwsync
; CHECK-NEXT: cntlzw 6, 6
; CHECK-NEXT: lbz 12, sc@toc@l(4)
; CHECK-NEXT: srwi 6, 6, 5
; CHECK-NEXT: stw 6, ui@toc@l(5)
; CHECK-NEXT: lbz 6, uc@toc@l(3)
-; CHECK-NEXT: extsb 0, 12
+; CHECK-NEXT: extsb 12, 12
; CHECK-NEXT: sync
-; CHECK-NEXT: .LBB3_45: # %entry
+; CHECK-NEXT: .LBB3_34: # %entry
; CHECK-NEXT: #
-; CHECK-NEXT: lharx 12, 0, 11
-; CHECK-NEXT: cmpw 6, 12
-; CHECK-NEXT: bne 0, .LBB3_47
-; CHECK-NEXT: # %bb.46: # %entry
+; CHECK-NEXT: lharx 0, 0, 11
+; CHECK-NEXT: cmpw 0, 6
+; CHECK-NEXT: bne 0, .LBB3_36
+; CHECK-NEXT: # %bb.35: # %entry
; CHECK-NEXT: #
-; CHECK-NEXT: sthcx. 0, 0, 11
-; CHECK-NEXT: bne 0, .LBB3_45
-; CHECK-NEXT: b .LBB3_48
-; CHECK-NEXT: .LBB3_47: # %entry
; CHECK-NEXT: sthcx. 12, 0, 11
-; CHECK-NEXT: .LBB3_48: # %entry
-; CHECK-NEXT: xor 6, 12, 6
+; CHECK-NEXT: bne 0, .LBB3_34
+; CHECK-NEXT: .LBB3_36: # %entry
+; CHECK-NEXT: xor 6, 0, 6
; CHECK-NEXT: lwsync
; CHECK-NEXT: cntlzw 6, 6
; CHECK-NEXT: lbz 11, sc@toc@l(4)
; CHECK-NEXT: srwi 6, 6, 5
; CHECK-NEXT: stw 6, ui@toc@l(5)
; CHECK-NEXT: lbz 6, uc@toc@l(3)
-; CHECK-NEXT: extsb 12, 11
+; CHECK-NEXT: extsb 11, 11
; CHECK-NEXT: sync
-; CHECK-NEXT: .LBB3_49: # %entry
+; CHECK-NEXT: .LBB3_37: # %entry
; CHECK-NEXT: #
-; CHECK-NEXT: lwarx 11, 0, 10
-; CHECK-NEXT: cmpw 6, 11
-; CHECK-NEXT: bne 0, .LBB3_51
-; CHECK-NEXT: # %bb.50: # %entry
+; CHECK-NEXT: lwarx 12, 0, 10
+; CHECK-NEXT: cmpw 12, 6
+; CHECK-NEXT: bne 0, .LBB3_39
+; CHECK-NEXT: # %bb.38: # %entry
; CHECK-NEXT: #
-; CHECK-NEXT: stwcx. 12, 0, 10
-; CHECK-NEXT: bne 0, .LBB3_49
-; CHECK-NEXT: b .LBB3_52
-; CHECK-NEXT: .LBB3_51: # %entry
; CHECK-NEXT: stwcx. 11, 0, 10
-; CHECK-NEXT: .LBB3_52: # %entry
-; CHECK-NEXT: xor 6, 11, 6
+; CHECK-NEXT: bne 0, .LBB3_37
+; CHECK-NEXT: .LBB3_39: # %entry
+; CHECK-NEXT: xor 6, 12, 6
; CHECK-NEXT: lwsync
; CHECK-NEXT: cntlzw 6, 6
; CHECK-NEXT: lbz 10, sc@toc@l(4)
; CHECK-NEXT: srwi 6, 6, 5
; CHECK-NEXT: stw 6, ui@toc@l(5)
; CHECK-NEXT: lbz 6, uc@toc@l(3)
-; CHECK-NEXT: extsb 11, 10
+; CHECK-NEXT: extsb 10, 10
; CHECK-NEXT: sync
-; CHECK-NEXT: .LBB3_53: # %entry
+; CHECK-NEXT: .LBB3_40: # %entry
; CHECK-NEXT: #
-; CHECK-NEXT: lwarx 10, 0, 9
-; CHECK-NEXT: cmpw 6, 10
-; CHECK-NEXT: bne 0, .LBB3_55
-; CHECK-NEXT: # %bb.54: # %entry
+; CHECK-NEXT: lwarx 11, 0, 9
+; CHECK-NEXT: cmpw 11, 6
+; CHECK-NEXT: bne 0, .LBB3_42
+; CHECK-NEXT: # %bb.41: # %entry
; CHECK-NEXT: #
-; CHECK-NEXT: stwcx. 11, 0, 9
-; CHECK-NEXT: bne 0, .LBB3_53
-; CHECK-NEXT: b .LBB3_56
-; CHECK-NEXT: .LBB3_55: # %entry
; CHECK-NEXT: stwcx. 10, 0, 9
-; CHECK-NEXT: .LBB3_56: # %entry
-; CHECK-NEXT: xor 6, 10, 6
+; CHECK-NEXT: bne 0, .LBB3_40
+; CHECK-NEXT: .LBB3_42: # %entry
+; CHECK-NEXT: xor 6, 11, 6
; CHECK-NEXT: lwsync
; CHECK-NEXT: cntlzw 6, 6
; CHECK-NEXT: lbz 9, sc@toc@l(4)
; CHECK-NEXT: srwi 6, 6, 5
; CHECK-NEXT: stw 6, ui@toc@l(5)
; CHECK-NEXT: lbz 6, uc@toc@l(3)
-; CHECK-NEXT: extsb 10, 9
+; CHECK-NEXT: extsb 9, 9
; CHECK-NEXT: sync
-; CHECK-NEXT: .LBB3_57: # %entry
+; CHECK-NEXT: .LBB3_43: # %entry
; CHECK-NEXT: #
-; CHECK-NEXT: ldarx 9, 0, 8
-; CHECK-NEXT: cmpd 6, 9
-; CHECK-NEXT: bne 0, .LBB3_59
-; CHECK-NEXT: # %bb.58: # %entry
+; CHECK-NEXT: ldarx 10, 0, 8
+; CHECK-NEXT: cmpd 10, 6
+; CHECK-NEXT: bne 0, .LBB3_45
+; CHECK-NEXT: # %bb.44: # %entry
; CHECK-NEXT: #
-; CHECK-NEXT: stdcx. 10, 0, 8
-; CHECK-NEXT: bne 0, .LBB3_57
-; CHECK-NEXT: b .LBB3_60
-; CHECK-NEXT: .LBB3_59: # %entry
; CHECK-NEXT: stdcx. 9, 0, 8
-; CHECK-NEXT: .LBB3_60: # %entry
-; CHECK-NEXT: xor 6, 9, 6
+; CHECK-NEXT: bne 0, .LBB3_43
+; CHECK-NEXT: .LBB3_45: # %entry
+; CHECK-NEXT: xor 6, 10, 6
; CHECK-NEXT: lwsync
; CHECK-NEXT: cntlzd 6, 6
; CHECK-NEXT: lbz 4, sc@toc@l(4)
; CHECK-NEXT: lbz 3, uc@toc@l(3)
; CHECK-NEXT: rldicl 6, 6, 58, 63
; CHECK-NEXT: stw 6, ui@toc@l(5)
-; CHECK-NEXT: extsb 6, 4
+; CHECK-NEXT: extsb 4, 4
; CHECK-NEXT: sync
-; CHECK-NEXT: .LBB3_61: # %entry
+; CHECK-NEXT: .LBB3_46: # %entry
; CHECK-NEXT: #
-; CHECK-NEXT: ldarx 4, 0, 7
-; CHECK-NEXT: cmpd 3, 4
-; CHECK-NEXT: bne 0, .LBB3_63
-; CHECK-NEXT: # %bb.62: # %entry
+; CHECK-NEXT: ldarx 6, 0, 7
+; CHECK-NEXT: cmpd 6, 3
+; CHECK-NEXT: bne 0, .LBB3_48
+; CHECK-NEXT: # %bb.47: # %entry
; CHECK-NEXT: #
-; CHECK-NEXT: stdcx. 6, 0, 7
-; CHECK-NEXT: bne 0, .LBB3_61
-; CHECK-NEXT: b .LBB3_64
-; CHECK-NEXT: .LBB3_63: # %entry
; CHECK-NEXT: stdcx. 4, 0, 7
-; CHECK-NEXT: .LBB3_64: # %entry
-; CHECK-NEXT: xor 3, 4, 3
+; CHECK-NEXT: bne 0, .LBB3_46
+; CHECK-NEXT: .LBB3_48: # %entry
+; CHECK-NEXT: xor 3, 6, 3
; CHECK-NEXT: lwsync
; CHECK-NEXT: cntlzd 3, 3
; CHECK-NEXT: ld 30, -16(1) # 8-byte Folded Reload
; AIX32-NEXT: xori 23, 4, 24
; AIX32-NEXT: li 4, 255
; AIX32-NEXT: slw 6, 3, 23
-; AIX32-NEXT: slw 7, 5, 23
+; AIX32-NEXT: slw 5, 5, 23
; AIX32-NEXT: slw 3, 4, 23
; AIX32-NEXT: stw 20, 80(1) # 4-byte Folded Spill
; AIX32-NEXT: stw 21, 84(1) # 4-byte Folded Spill
; AIX32-NEXT: stw 27, 108(1) # 4-byte Folded Spill
; AIX32-NEXT: stw 30, 120(1) # 4-byte Folded Spill
; AIX32-NEXT: stw 31, 124(1) # 4-byte Folded Spill
-; AIX32-NEXT: and 5, 6, 3
-; AIX32-NEXT: and 6, 7, 3
+; AIX32-NEXT: and 4, 6, 3
+; AIX32-NEXT: and 5, 5, 3
; AIX32-NEXT: sync
; AIX32-NEXT: L..BB3_1: # %entry
; AIX32-NEXT: #
; AIX32-NEXT: lwarx 7, 0, 19
-; AIX32-NEXT: and 4, 7, 3
-; AIX32-NEXT: cmpw 4, 6
+; AIX32-NEXT: and 6, 7, 3
+; AIX32-NEXT: cmpw 6, 5
; AIX32-NEXT: bne 0, L..BB3_3
; AIX32-NEXT: # %bb.2: # %entry
; AIX32-NEXT: #
; AIX32-NEXT: andc 7, 7, 3
-; AIX32-NEXT: or 7, 7, 5
+; AIX32-NEXT: or 7, 7, 4
; AIX32-NEXT: stwcx. 7, 0, 19
; AIX32-NEXT: bne 0, L..BB3_1
-; AIX32-NEXT: b L..BB3_4
; AIX32-NEXT: L..BB3_3: # %entry
-; AIX32-NEXT: stwcx. 7, 0, 19
-; AIX32-NEXT: L..BB3_4: # %entry
-; AIX32-NEXT: srw 3, 4, 23
; AIX32-NEXT: lwsync
; AIX32-NEXT: rlwinm 4, 29, 3, 27, 28
+; AIX32-NEXT: srw 3, 6, 23
; AIX32-NEXT: lbz 5, 0(29)
; AIX32-NEXT: xori 25, 4, 24
; AIX32-NEXT: stb 3, 0(28)
; AIX32-NEXT: rlwinm 22, 29, 0, 0, 29
; AIX32-NEXT: and 5, 4, 3
; AIX32-NEXT: and 6, 6, 3
-; AIX32-NEXT: L..BB3_5: # %entry
+; AIX32-NEXT: L..BB3_4: # %entry
; AIX32-NEXT: #
; AIX32-NEXT: lwarx 7, 0, 22
; AIX32-NEXT: and 4, 7, 3
; AIX32-NEXT: cmpw 4, 6
-; AIX32-NEXT: bne 0, L..BB3_7
-; AIX32-NEXT: # %bb.6: # %entry
+; AIX32-NEXT: bne 0, L..BB3_6
+; AIX32-NEXT: # %bb.5: # %entry
; AIX32-NEXT: #
; AIX32-NEXT: andc 7, 7, 3
; AIX32-NEXT: or 7, 7, 5
; AIX32-NEXT: stwcx. 7, 0, 22
-; AIX32-NEXT: bne 0, L..BB3_5
-; AIX32-NEXT: b L..BB3_8
-; AIX32-NEXT: L..BB3_7: # %entry
-; AIX32-NEXT: stwcx. 7, 0, 22
-; AIX32-NEXT: L..BB3_8: # %entry
+; AIX32-NEXT: bne 0, L..BB3_4
+; AIX32-NEXT: L..BB3_6: # %entry
; AIX32-NEXT: lwz 3, L..C2(2) # @ss
; AIX32-NEXT: lwsync
; AIX32-NEXT: li 7, 0
; AIX32-NEXT: rlwinm 20, 3, 0, 0, 29
; AIX32-NEXT: and 6, 5, 4
; AIX32-NEXT: and 7, 7, 4
-; AIX32-NEXT: L..BB3_9: # %entry
+; AIX32-NEXT: L..BB3_7: # %entry
; AIX32-NEXT: #
; AIX32-NEXT: lwarx 8, 0, 20
; AIX32-NEXT: and 5, 8, 4
; AIX32-NEXT: cmpw 5, 7
-; AIX32-NEXT: bne 0, L..BB3_11
-; AIX32-NEXT: # %bb.10: # %entry
+; AIX32-NEXT: bne 0, L..BB3_9
+; AIX32-NEXT: # %bb.8: # %entry
; AIX32-NEXT: #
; AIX32-NEXT: andc 8, 8, 4
; AIX32-NEXT: or 8, 8, 6
; AIX32-NEXT: stwcx. 8, 0, 20
-; AIX32-NEXT: bne 0, L..BB3_9
-; AIX32-NEXT: b L..BB3_12
-; AIX32-NEXT: L..BB3_11: # %entry
-; AIX32-NEXT: stwcx. 8, 0, 20
-; AIX32-NEXT: L..BB3_12: # %entry
+; AIX32-NEXT: bne 0, L..BB3_7
+; AIX32-NEXT: L..BB3_9: # %entry
; AIX32-NEXT: lwz 4, L..C3(2) # @us
; AIX32-NEXT: lwsync
; AIX32-NEXT: srw 5, 5, 24
; AIX32-NEXT: extsb 6, 6
; AIX32-NEXT: xori 21, 3, 16
; AIX32-NEXT: ori 3, 5, 65535
-; AIX32-NEXT: slw 6, 6, 21
+; AIX32-NEXT: slw 5, 6, 21
; AIX32-NEXT: slw 7, 7, 21
-; AIX32-NEXT: slw 5, 3, 21
+; AIX32-NEXT: slw 3, 3, 21
; AIX32-NEXT: rlwinm 18, 4, 0, 0, 29
-; AIX32-NEXT: and 6, 6, 5
-; AIX32-NEXT: and 7, 7, 5
-; AIX32-NEXT: L..BB3_13: # %entry
+; AIX32-NEXT: and 6, 5, 3
+; AIX32-NEXT: and 7, 7, 3
+; AIX32-NEXT: L..BB3_10: # %entry
; AIX32-NEXT: #
; AIX32-NEXT: lwarx 8, 0, 18
-; AIX32-NEXT: and 3, 8, 5
-; AIX32-NEXT: cmpw 3, 7
-; AIX32-NEXT: bne 0, L..BB3_15
-; AIX32-NEXT: # %bb.14: # %entry
+; AIX32-NEXT: and 5, 8, 3
+; AIX32-NEXT: cmpw 5, 7
+; AIX32-NEXT: bne 0, L..BB3_12
+; AIX32-NEXT: # %bb.11: # %entry
; AIX32-NEXT: #
-; AIX32-NEXT: andc 8, 8, 5
+; AIX32-NEXT: andc 8, 8, 3
; AIX32-NEXT: or 8, 8, 6
; AIX32-NEXT: stwcx. 8, 0, 18
-; AIX32-NEXT: bne 0, L..BB3_13
-; AIX32-NEXT: b L..BB3_16
-; AIX32-NEXT: L..BB3_15: # %entry
-; AIX32-NEXT: stwcx. 8, 0, 18
-; AIX32-NEXT: L..BB3_16: # %entry
+; AIX32-NEXT: bne 0, L..BB3_10
+; AIX32-NEXT: L..BB3_12: # %entry
; AIX32-NEXT: lwsync
-; AIX32-NEXT: srw 3, 3, 21
+; AIX32-NEXT: srw 3, 5, 21
; AIX32-NEXT: lwz 17, L..C4(2) # @si
; AIX32-NEXT: lbz 5, 0(28)
; AIX32-NEXT: sth 3, 0(4)
; AIX32-NEXT: lbz 3, 0(29)
; AIX32-NEXT: sync
-; AIX32-NEXT: extsb 5, 5
-; AIX32-NEXT: L..BB3_17: # %entry
+; AIX32-NEXT: extsb 4, 5
+; AIX32-NEXT: L..BB3_13: # %entry
; AIX32-NEXT: #
-; AIX32-NEXT: lwarx 4, 0, 17
-; AIX32-NEXT: cmpw 3, 4
-; AIX32-NEXT: bne 0, L..BB3_19
-; AIX32-NEXT: # %bb.18: # %entry
+; AIX32-NEXT: lwarx 5, 0, 17
+; AIX32-NEXT: cmpw 5, 3
+; AIX32-NEXT: bne 0, L..BB3_15
+; AIX32-NEXT: # %bb.14: # %entry
; AIX32-NEXT: #
-; AIX32-NEXT: stwcx. 5, 0, 17
-; AIX32-NEXT: bne 0, L..BB3_17
-; AIX32-NEXT: b L..BB3_20
-; AIX32-NEXT: L..BB3_19: # %entry
; AIX32-NEXT: stwcx. 4, 0, 17
-; AIX32-NEXT: L..BB3_20: # %entry
+; AIX32-NEXT: bne 0, L..BB3_13
+; AIX32-NEXT: L..BB3_15: # %entry
; AIX32-NEXT: lwsync
-; AIX32-NEXT: stw 4, 0(17)
; AIX32-NEXT: lwz 27, L..C5(2) # @ui
+; AIX32-NEXT: stw 5, 0(17)
; AIX32-NEXT: lbz 4, 0(28)
; AIX32-NEXT: lbz 3, 0(29)
; AIX32-NEXT: sync
-; AIX32-NEXT: extsb 5, 4
-; AIX32-NEXT: L..BB3_21: # %entry
+; AIX32-NEXT: extsb 4, 4
+; AIX32-NEXT: L..BB3_16: # %entry
; AIX32-NEXT: #
-; AIX32-NEXT: lwarx 4, 0, 27
-; AIX32-NEXT: cmpw 3, 4
-; AIX32-NEXT: bne 0, L..BB3_23
-; AIX32-NEXT: # %bb.22: # %entry
+; AIX32-NEXT: lwarx 5, 0, 27
+; AIX32-NEXT: cmpw 5, 3
+; AIX32-NEXT: bne 0, L..BB3_18
+; AIX32-NEXT: # %bb.17: # %entry
; AIX32-NEXT: #
-; AIX32-NEXT: stwcx. 5, 0, 27
-; AIX32-NEXT: bne 0, L..BB3_21
-; AIX32-NEXT: b L..BB3_24
-; AIX32-NEXT: L..BB3_23: # %entry
; AIX32-NEXT: stwcx. 4, 0, 27
-; AIX32-NEXT: L..BB3_24: # %entry
+; AIX32-NEXT: bne 0, L..BB3_16
+; AIX32-NEXT: L..BB3_18: # %entry
; AIX32-NEXT: lwsync
-; AIX32-NEXT: stw 4, 0(27)
; AIX32-NEXT: lwz 31, L..C6(2) # @sll
+; AIX32-NEXT: stw 5, 0(27)
; AIX32-NEXT: li 26, 0
; AIX32-NEXT: li 7, 5
; AIX32-NEXT: lbz 4, 0(28)
; AIX32-NEXT: li 3, 255
; AIX32-NEXT: stw 5, 0(30)
; AIX32-NEXT: slw 5, 6, 23
-; AIX32-NEXT: slw 7, 4, 23
+; AIX32-NEXT: slw 6, 4, 23
; AIX32-NEXT: slw 3, 3, 23
; AIX32-NEXT: sync
-; AIX32-NEXT: and 6, 5, 3
-; AIX32-NEXT: and 7, 7, 3
-; AIX32-NEXT: L..BB3_25: # %entry
+; AIX32-NEXT: and 5, 5, 3
+; AIX32-NEXT: and 6, 6, 3
+; AIX32-NEXT: L..BB3_19: # %entry
; AIX32-NEXT: #
; AIX32-NEXT: lwarx 8, 0, 19
-; AIX32-NEXT: and 5, 8, 3
-; AIX32-NEXT: cmpw 5, 7
-; AIX32-NEXT: bne 0, L..BB3_27
-; AIX32-NEXT: # %bb.26: # %entry
+; AIX32-NEXT: and 7, 8, 3
+; AIX32-NEXT: cmpw 7, 6
+; AIX32-NEXT: bne 0, L..BB3_21
+; AIX32-NEXT: # %bb.20: # %entry
; AIX32-NEXT: #
; AIX32-NEXT: andc 8, 8, 3
-; AIX32-NEXT: or 8, 8, 6
-; AIX32-NEXT: stwcx. 8, 0, 19
-; AIX32-NEXT: bne 0, L..BB3_25
-; AIX32-NEXT: b L..BB3_28
-; AIX32-NEXT: L..BB3_27: # %entry
+; AIX32-NEXT: or 8, 8, 5
; AIX32-NEXT: stwcx. 8, 0, 19
-; AIX32-NEXT: L..BB3_28: # %entry
-; AIX32-NEXT: srw 5, 5, 23
+; AIX32-NEXT: bne 0, L..BB3_19
+; AIX32-NEXT: L..BB3_21: # %entry
+; AIX32-NEXT: srw 5, 7, 23
; AIX32-NEXT: lwsync
; AIX32-NEXT: li 3, 1
; AIX32-NEXT: li 7, 255
; AIX32-NEXT: sync
; AIX32-NEXT: and 7, 5, 6
; AIX32-NEXT: and 8, 8, 6
-; AIX32-NEXT: L..BB3_29: # %entry
+; AIX32-NEXT: L..BB3_22: # %entry
; AIX32-NEXT: #
; AIX32-NEXT: lwarx 9, 0, 22
; AIX32-NEXT: and 5, 9, 6
; AIX32-NEXT: cmpw 5, 8
-; AIX32-NEXT: bne 0, L..BB3_31
-; AIX32-NEXT: # %bb.30: # %entry
+; AIX32-NEXT: bne 0, L..BB3_24
+; AIX32-NEXT: # %bb.23: # %entry
; AIX32-NEXT: #
; AIX32-NEXT: andc 9, 9, 6
; AIX32-NEXT: or 9, 9, 7
; AIX32-NEXT: stwcx. 9, 0, 22
-; AIX32-NEXT: bne 0, L..BB3_29
-; AIX32-NEXT: b L..BB3_32
-; AIX32-NEXT: L..BB3_31: # %entry
-; AIX32-NEXT: stwcx. 9, 0, 22
-; AIX32-NEXT: L..BB3_32: # %entry
+; AIX32-NEXT: bne 0, L..BB3_22
+; AIX32-NEXT: L..BB3_24: # %entry
; AIX32-NEXT: lwsync
; AIX32-NEXT: srw 5, 5, 25
; AIX32-NEXT: lbz 6, 0(28)
; AIX32-NEXT: slw 6, 5, 24
; AIX32-NEXT: and 7, 7, 6
; AIX32-NEXT: and 8, 8, 6
-; AIX32-NEXT: L..BB3_33: # %entry
+; AIX32-NEXT: L..BB3_25: # %entry
; AIX32-NEXT: #
; AIX32-NEXT: lwarx 9, 0, 20
; AIX32-NEXT: and 5, 9, 6
; AIX32-NEXT: cmpw 5, 8
-; AIX32-NEXT: bne 0, L..BB3_35
-; AIX32-NEXT: # %bb.34: # %entry
+; AIX32-NEXT: bne 0, L..BB3_27
+; AIX32-NEXT: # %bb.26: # %entry
; AIX32-NEXT: #
; AIX32-NEXT: andc 9, 9, 6
; AIX32-NEXT: or 9, 9, 7
; AIX32-NEXT: stwcx. 9, 0, 20
-; AIX32-NEXT: bne 0, L..BB3_33
-; AIX32-NEXT: b L..BB3_36
-; AIX32-NEXT: L..BB3_35: # %entry
-; AIX32-NEXT: stwcx. 9, 0, 20
-; AIX32-NEXT: L..BB3_36: # %entry
+; AIX32-NEXT: bne 0, L..BB3_25
+; AIX32-NEXT: L..BB3_27: # %entry
; AIX32-NEXT: lwsync
; AIX32-NEXT: srw 5, 5, 24
; AIX32-NEXT: lbz 6, 0(28)
; AIX32-NEXT: ori 5, 5, 65535
; AIX32-NEXT: extsb 6, 6
; AIX32-NEXT: stw 7, 0(27)
-; AIX32-NEXT: slw 7, 6, 21
-; AIX32-NEXT: slw 8, 4, 21
+; AIX32-NEXT: slw 6, 6, 21
+; AIX32-NEXT: slw 7, 4, 21
; AIX32-NEXT: sync
-; AIX32-NEXT: slw 6, 5, 21
-; AIX32-NEXT: and 7, 7, 6
-; AIX32-NEXT: and 8, 8, 6
-; AIX32-NEXT: L..BB3_37: # %entry
+; AIX32-NEXT: slw 5, 5, 21
+; AIX32-NEXT: and 6, 6, 5
+; AIX32-NEXT: and 7, 7, 5
+; AIX32-NEXT: L..BB3_28: # %entry
; AIX32-NEXT: #
; AIX32-NEXT: lwarx 9, 0, 18
-; AIX32-NEXT: and 5, 9, 6
-; AIX32-NEXT: cmpw 5, 8
-; AIX32-NEXT: bne 0, L..BB3_39
-; AIX32-NEXT: # %bb.38: # %entry
+; AIX32-NEXT: and 8, 9, 5
+; AIX32-NEXT: cmpw 8, 7
+; AIX32-NEXT: bne 0, L..BB3_30
+; AIX32-NEXT: # %bb.29: # %entry
; AIX32-NEXT: #
-; AIX32-NEXT: andc 9, 9, 6
-; AIX32-NEXT: or 9, 9, 7
-; AIX32-NEXT: stwcx. 9, 0, 18
-; AIX32-NEXT: bne 0, L..BB3_37
-; AIX32-NEXT: b L..BB3_40
-; AIX32-NEXT: L..BB3_39: # %entry
+; AIX32-NEXT: andc 9, 9, 5
+; AIX32-NEXT: or 9, 9, 6
; AIX32-NEXT: stwcx. 9, 0, 18
-; AIX32-NEXT: L..BB3_40: # %entry
-; AIX32-NEXT: srw 5, 5, 21
+; AIX32-NEXT: bne 0, L..BB3_28
+; AIX32-NEXT: L..BB3_30: # %entry
+; AIX32-NEXT: srw 5, 8, 21
; AIX32-NEXT: lwsync
; AIX32-NEXT: cmpw 5, 4
; AIX32-NEXT: lbz 5, 0(28)
; AIX32-NEXT: iseleq 4, 3, 26
; AIX32-NEXT: stw 4, 0(27)
; AIX32-NEXT: lbz 4, 0(29)
-; AIX32-NEXT: extsb 6, 5
+; AIX32-NEXT: extsb 5, 5
; AIX32-NEXT: sync
-; AIX32-NEXT: L..BB3_41: # %entry
+; AIX32-NEXT: L..BB3_31: # %entry
; AIX32-NEXT: #
-; AIX32-NEXT: lwarx 5, 0, 17
-; AIX32-NEXT: cmpw 4, 5
-; AIX32-NEXT: bne 0, L..BB3_43
-; AIX32-NEXT: # %bb.42: # %entry
+; AIX32-NEXT: lwarx 6, 0, 17
+; AIX32-NEXT: cmpw 1, 6, 4
+; AIX32-NEXT: bne 1, L..BB3_33
+; AIX32-NEXT: # %bb.32: # %entry
; AIX32-NEXT: #
-; AIX32-NEXT: stwcx. 6, 0, 17
-; AIX32-NEXT: bne 0, L..BB3_41
-; AIX32-NEXT: b L..BB3_44
-; AIX32-NEXT: L..BB3_43: # %entry
; AIX32-NEXT: stwcx. 5, 0, 17
-; AIX32-NEXT: L..BB3_44: # %entry
-; AIX32-NEXT: cmpw 5, 4
+; AIX32-NEXT: bne 0, L..BB3_31
+; AIX32-NEXT: L..BB3_33: # %entry
; AIX32-NEXT: lwsync
-; AIX32-NEXT: iseleq 4, 3, 26
+; AIX32-NEXT: isel 4, 3, 26, 6
; AIX32-NEXT: lbz 5, 0(28)
; AIX32-NEXT: stw 4, 0(27)
; AIX32-NEXT: lbz 4, 0(29)
-; AIX32-NEXT: extsb 6, 5
; AIX32-NEXT: sync
-; AIX32-NEXT: L..BB3_45: # %entry
+; AIX32-NEXT: extsb 5, 5
+; AIX32-NEXT: L..BB3_34: # %entry
; AIX32-NEXT: #
-; AIX32-NEXT: lwarx 5, 0, 27
-; AIX32-NEXT: cmpw 4, 5
-; AIX32-NEXT: bne 0, L..BB3_47
-; AIX32-NEXT: # %bb.46: # %entry
+; AIX32-NEXT: lwarx 6, 0, 27
+; AIX32-NEXT: cmpw 1, 6, 4
+; AIX32-NEXT: bne 1, L..BB3_36
+; AIX32-NEXT: # %bb.35: # %entry
; AIX32-NEXT: #
-; AIX32-NEXT: stwcx. 6, 0, 27
-; AIX32-NEXT: bne 0, L..BB3_45
-; AIX32-NEXT: b L..BB3_48
-; AIX32-NEXT: L..BB3_47: # %entry
; AIX32-NEXT: stwcx. 5, 0, 27
-; AIX32-NEXT: L..BB3_48: # %entry
+; AIX32-NEXT: bne 0, L..BB3_34
+; AIX32-NEXT: L..BB3_36: # %entry
; AIX32-NEXT: lwsync
-; AIX32-NEXT: cmpw 5, 4
+; AIX32-NEXT: isel 3, 3, 26, 6
; AIX32-NEXT: li 7, 5
; AIX32-NEXT: li 8, 5
; AIX32-NEXT: lbz 4, 0(28)
-; AIX32-NEXT: iseleq 3, 3, 26
; AIX32-NEXT: lbz 9, 0(29)
; AIX32-NEXT: stw 3, 0(27)
; AIX32-NEXT: mr 3, 31
; CHECK-NEXT: .LBB5_1: # %entry
; CHECK-NEXT: #
; CHECK-NEXT: lwarx 5, 0, 6
-; CHECK-NEXT: cmplw 3, 5
-; CHECK-NEXT: bge 0, .LBB5_3
+; CHECK-NEXT: cmplwi 5, 5
+; CHECK-NEXT: blt 0, .LBB5_3
; CHECK-NEXT: # %bb.2: # %entry
; CHECK-NEXT: #
; CHECK-NEXT: stwcx. 3, 0, 6
; CHECK-NEXT: .LBB5_4: # %entry
; CHECK-NEXT: #
; CHECK-NEXT: lwarx 8, 0, 7
-; CHECK-NEXT: cmpw 3, 8
-; CHECK-NEXT: bge 0, .LBB5_6
+; CHECK-NEXT: cmpwi 8, 5
+; CHECK-NEXT: blt 0, .LBB5_6
; CHECK-NEXT: # %bb.5: # %entry
; CHECK-NEXT: #
; CHECK-NEXT: stwcx. 3, 0, 7
; CHECK-NEXT: .LBB5_7: # %entry
; CHECK-NEXT: #
; CHECK-NEXT: lwarx 8, 0, 6
-; CHECK-NEXT: cmplw 3, 8
-; CHECK-NEXT: ble 0, .LBB5_9
+; CHECK-NEXT: cmplwi 8, 5
+; CHECK-NEXT: bgt 0, .LBB5_9
; CHECK-NEXT: # %bb.8: # %entry
; CHECK-NEXT: #
; CHECK-NEXT: stwcx. 3, 0, 6
; CHECK-NEXT: .LBB5_10: # %entry
; CHECK-NEXT: #
; CHECK-NEXT: lwarx 4, 0, 7
-; CHECK-NEXT: cmpw 3, 4
-; CHECK-NEXT: ble 0, .LBB5_12
+; CHECK-NEXT: cmpwi 4, 5
+; CHECK-NEXT: bgt 0, .LBB5_12
; CHECK-NEXT: # %bb.11: # %entry
; CHECK-NEXT: #
; CHECK-NEXT: stwcx. 3, 0, 7
; AIX32-NEXT: L..BB5_1: # %entry
; AIX32-NEXT: #
; AIX32-NEXT: lwarx 5, 0, 4
-; AIX32-NEXT: cmplw 3, 5
-; AIX32-NEXT: bge 0, L..BB5_3
+; AIX32-NEXT: cmplwi 5, 5
+; AIX32-NEXT: blt 0, L..BB5_3
; AIX32-NEXT: # %bb.2: # %entry
; AIX32-NEXT: #
; AIX32-NEXT: stwcx. 3, 0, 4
; AIX32-NEXT: L..BB5_4: # %entry
; AIX32-NEXT: #
; AIX32-NEXT: lwarx 6, 0, 5
-; AIX32-NEXT: cmpw 3, 6
-; AIX32-NEXT: bge 0, L..BB5_6
+; AIX32-NEXT: cmpwi 6, 5
+; AIX32-NEXT: blt 0, L..BB5_6
; AIX32-NEXT: # %bb.5: # %entry
; AIX32-NEXT: #
; AIX32-NEXT: stwcx. 3, 0, 5
; AIX32-NEXT: L..BB5_7: # %entry
; AIX32-NEXT: #
; AIX32-NEXT: lwarx 6, 0, 4
-; AIX32-NEXT: cmplw 3, 6
-; AIX32-NEXT: ble 0, L..BB5_9
+; AIX32-NEXT: cmplwi 6, 5
+; AIX32-NEXT: bgt 0, L..BB5_9
; AIX32-NEXT: # %bb.8: # %entry
; AIX32-NEXT: #
; AIX32-NEXT: stwcx. 3, 0, 4
; AIX32-NEXT: L..BB5_10: # %entry
; AIX32-NEXT: #
; AIX32-NEXT: lwarx 4, 0, 5
-; AIX32-NEXT: cmpw 3, 4
-; AIX32-NEXT: ble 0, L..BB5_12
+; AIX32-NEXT: cmpwi 4, 5
+; AIX32-NEXT: bgt 0, L..BB5_12
; AIX32-NEXT: # %bb.11: # %entry
; AIX32-NEXT: #
; AIX32-NEXT: stwcx. 3, 0, 5
define dso_local i64 @cmpswplp(ptr noundef %ptr, ptr nocapture noundef readnone %oldval, i64 noundef %newval) local_unnamed_addr #0 {
; CHECK-LABEL: cmpswplp:
; CHECK: # %bb.0: # %entry
-; CHECK-NEXT: addi 6, 5, 1
+; CHECK-NEXT: addi 4, 5, 1
; CHECK-NEXT: .LBB6_1: # %entry
; CHECK-NEXT: #
-; CHECK-NEXT: ldarx 4, 0, 3
-; CHECK-NEXT: cmpd 5, 4
-; CHECK-NEXT: bne 0, .LBB6_3
+; CHECK-NEXT: ldarx 6, 0, 3
+; CHECK-NEXT: cmpd 1, 6, 5
+; CHECK-NEXT: bne 1, .LBB6_3
; CHECK-NEXT: # %bb.2: # %entry
; CHECK-NEXT: #
-; CHECK-NEXT: stdcx. 6, 0, 3
+; CHECK-NEXT: stdcx. 4, 0, 3
; CHECK-NEXT: bne 0, .LBB6_1
-; CHECK-NEXT: b .LBB6_4
; CHECK-NEXT: .LBB6_3: # %entry
-; CHECK-NEXT: stdcx. 4, 0, 3
-; CHECK-NEXT: .LBB6_4: # %entry
-; CHECK-NEXT: cmpd 4, 5
; CHECK-NEXT: li 3, 66
; CHECK-NEXT: li 4, 55
-; CHECK-NEXT: iseleq 3, 4, 3
+; CHECK-NEXT: isel 3, 4, 3, 6
; CHECK-NEXT: blr
;
; AIX32-LABEL: cmpswplp:
; CHECK-NEXT: .LBB7_1: # %entry
; CHECK-NEXT: #
; CHECK-NEXT: ldarx 5, 0, 3
-; CHECK-NEXT: cmpd 4, 5
-; CHECK-NEXT: ble 0, .LBB7_3
+; CHECK-NEXT: cmpd 1, 5, 4
+; CHECK-NEXT: bgt 1, .LBB7_3
; CHECK-NEXT: # %bb.2: # %entry
; CHECK-NEXT: #
; CHECK-NEXT: stdcx. 4, 0, 3
; CHECK-NEXT: bne 0, .LBB7_1
; CHECK-NEXT: .LBB7_3: # %entry
-; CHECK-NEXT: cmpd 5, 4
; CHECK-NEXT: li 3, 55
; CHECK-NEXT: li 4, 66
; CHECK-NEXT: lwsync
-; CHECK-NEXT: iselgt 3, 4, 3
+; CHECK-NEXT: isel 3, 4, 3, 5
; CHECK-NEXT: blr
;
; AIX32-LABEL: atommax8:
; CHECK-NEXT: .LBB8_1: # %entry
; CHECK-NEXT: #
; CHECK-NEXT: lwarx 5, 0, 3
-; CHECK-NEXT: cmpw 4, 5
-; CHECK-NEXT: ble 0, .LBB8_3
+; CHECK-NEXT: cmpw 1, 5, 4
+; CHECK-NEXT: bgt 1, .LBB8_3
; CHECK-NEXT: # %bb.2: # %entry
; CHECK-NEXT: #
; CHECK-NEXT: stwcx. 4, 0, 3
; CHECK-NEXT: bne 0, .LBB8_1
; CHECK-NEXT: .LBB8_3: # %entry
-; CHECK-NEXT: cmpw 5, 4
; CHECK-NEXT: li 3, 55
; CHECK-NEXT: li 4, 66
; CHECK-NEXT: lwsync
-; CHECK-NEXT: iselgt 3, 4, 3
+; CHECK-NEXT: isel 3, 4, 3, 5
; CHECK-NEXT: blr
;
; AIX32-LABEL: atommax4:
; AIX32-NEXT: L..BB8_1: # %entry
; AIX32-NEXT: #
; AIX32-NEXT: lwarx 5, 0, 3
-; AIX32-NEXT: cmpw 4, 5
-; AIX32-NEXT: ble 0, L..BB8_3
+; AIX32-NEXT: cmpw 1, 5, 4
+; AIX32-NEXT: bgt 1, L..BB8_3
; AIX32-NEXT: # %bb.2: # %entry
; AIX32-NEXT: #
; AIX32-NEXT: stwcx. 4, 0, 3
; AIX32-NEXT: bne 0, L..BB8_1
; AIX32-NEXT: L..BB8_3: # %entry
-; AIX32-NEXT: cmpw 5, 4
; AIX32-NEXT: li 3, 55
; AIX32-NEXT: li 4, 66
; AIX32-NEXT: lwsync
-; AIX32-NEXT: iselgt 3, 4, 3
+; AIX32-NEXT: isel 3, 4, 3, 5
; AIX32-NEXT: blr
entry:
%0 = atomicrmw max ptr %ptr, i32 %val seq_cst, align 4
; CHECK-NEXT: #
; CHECK-NEXT: lharx 5, 0, 3
; CHECK-NEXT: extsh 5, 5
-; CHECK-NEXT: cmpw 4, 5
-; CHECK-NEXT: ble 0, .LBB9_3
+; CHECK-NEXT: cmpw 1, 5, 4
+; CHECK-NEXT: bgt 1, .LBB9_3
; CHECK-NEXT: # %bb.2: # %entry
; CHECK-NEXT: #
; CHECK-NEXT: sthcx. 4, 0, 3
; CHECK-NEXT: bne 0, .LBB9_1
; CHECK-NEXT: .LBB9_3: # %entry
-; CHECK-NEXT: cmpw 5, 4
; CHECK-NEXT: li 3, 55
; CHECK-NEXT: li 4, 66
; CHECK-NEXT: lwsync
-; CHECK-NEXT: iselgt 3, 4, 3
+; CHECK-NEXT: isel 3, 4, 3, 5
; CHECK-NEXT: blr
;
; AIX32-LABEL: atommax2:
; AIX32-NEXT: and 9, 8, 6
; AIX32-NEXT: srw 9, 9, 5
; AIX32-NEXT: extsh 9, 9
-; AIX32-NEXT: cmpw 4, 9
-; AIX32-NEXT: ble 0, L..BB9_3
+; AIX32-NEXT: cmpw 9, 4
+; AIX32-NEXT: bgt 0, L..BB9_3
; AIX32-NEXT: # %bb.2: # %entry
; AIX32-NEXT: #
; AIX32-NEXT: andc 9, 8, 6
; CHECK-NEXT: .LBB10_1: # %entry
; CHECK-NEXT: #
; CHECK-NEXT: lbarx 5, 0, 3
-; CHECK-NEXT: cmplw 4, 5
-; CHECK-NEXT: ble 0, .LBB10_3
+; CHECK-NEXT: cmplw 1, 5, 4
+; CHECK-NEXT: bgt 1, .LBB10_3
; CHECK-NEXT: # %bb.2: # %entry
; CHECK-NEXT: #
; CHECK-NEXT: stbcx. 4, 0, 3
; CHECK-NEXT: bne 0, .LBB10_1
; CHECK-NEXT: .LBB10_3: # %entry
-; CHECK-NEXT: cmplw 5, 4
; CHECK-NEXT: li 3, 55
; CHECK-NEXT: li 4, 66
; CHECK-NEXT: lwsync
-; CHECK-NEXT: iselgt 3, 4, 3
+; CHECK-NEXT: isel 3, 4, 3, 5
; CHECK-NEXT: blr
;
; AIX32-LABEL: atommax1:
; AIX32-NEXT: #
; AIX32-NEXT: lwarx 9, 0, 3
; AIX32-NEXT: and 10, 9, 7
-; AIX32-NEXT: cmplw 6, 10
-; AIX32-NEXT: ble 0, L..BB10_3
+; AIX32-NEXT: cmplw 10, 6
+; AIX32-NEXT: bgt 0, L..BB10_3
; AIX32-NEXT: # %bb.2: # %entry
; AIX32-NEXT: #
; AIX32-NEXT: andc 10, 9, 7
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -verify-machineinstrs < %s | FileCheck %s
target datalayout = "E-m:e-i64:64-n32:64"
target triple = "powerpc64-unknown-linux-gnu"
define void @a32min(i32* nocapture dereferenceable(4) %minimum, i32 %val) #0 {
+; CHECK-LABEL: a32min:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: .LBB0_1: # %entry
+; CHECK-NEXT: #
+; CHECK-NEXT: lwarx 5, 0, 3
+; CHECK-NEXT: cmpw 5, 4
+; CHECK-NEXT: bltlr 0
+; CHECK-NEXT: # %bb.2: # %entry
+; CHECK-NEXT: #
+; CHECK-NEXT: stwcx. 4, 0, 3
+; CHECK-NEXT: bne 0, .LBB0_1
+; CHECK-NEXT: # %bb.3: # %entry
+; CHECK-NEXT: blr
entry:
%0 = atomicrmw min i32* %minimum, i32 %val monotonic
ret void
-; CHECK-LABEL: @a32min
-; CHECK: lwarx [[OLDV:[0-9]+]], 0, 3
-; CHECK: cmpw 4, [[OLDV]]
-; CHECK: bgelr 0
-; CHECK: stwcx. 4, 0, 3
-; CHECK: bne 0,
-; CHECK: blr
}
define void @a32max(i32* nocapture dereferenceable(4) %minimum, i32 %val) #0 {
+; CHECK-LABEL: a32max:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: .LBB1_1: # %entry
+; CHECK-NEXT: #
+; CHECK-NEXT: lwarx 5, 0, 3
+; CHECK-NEXT: cmpw 5, 4
+; CHECK-NEXT: bgtlr 0
+; CHECK-NEXT: # %bb.2: # %entry
+; CHECK-NEXT: #
+; CHECK-NEXT: stwcx. 4, 0, 3
+; CHECK-NEXT: bne 0, .LBB1_1
+; CHECK-NEXT: # %bb.3: # %entry
+; CHECK-NEXT: blr
entry:
%0 = atomicrmw max i32* %minimum, i32 %val monotonic
ret void
-; CHECK-LABEL: @a32max
-; CHECK: lwarx [[OLDV:[0-9]+]], 0, 3
-; CHECK: cmpw 4, [[OLDV]]
-; CHECK: blelr 0
-; CHECK: stwcx. 4, 0, 3
-; CHECK: bne 0,
-; CHECK: blr
}
define void @a32umin(i32* nocapture dereferenceable(4) %minimum, i32 %val) #0 {
+; CHECK-LABEL: a32umin:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: .LBB2_1: # %entry
+; CHECK-NEXT: #
+; CHECK-NEXT: lwarx 5, 0, 3
+; CHECK-NEXT: cmplw 5, 4
+; CHECK-NEXT: bltlr 0
+; CHECK-NEXT: # %bb.2: # %entry
+; CHECK-NEXT: #
+; CHECK-NEXT: stwcx. 4, 0, 3
+; CHECK-NEXT: bne 0, .LBB2_1
+; CHECK-NEXT: # %bb.3: # %entry
+; CHECK-NEXT: blr
entry:
%0 = atomicrmw umin i32* %minimum, i32 %val monotonic
ret void
-; CHECK-LABEL: @a32umin
-; CHECK: lwarx [[OLDV:[0-9]+]], 0, 3
-; CHECK: cmplw 4, [[OLDV]]
-; CHECK: bgelr 0
-; CHECK: stwcx. 4, 0, 3
-; CHECK: bne 0,
-; CHECK: blr
}
define void @a32umax(i32* nocapture dereferenceable(4) %minimum, i32 %val) #0 {
+; CHECK-LABEL: a32umax:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: .LBB3_1: # %entry
+; CHECK-NEXT: #
+; CHECK-NEXT: lwarx 5, 0, 3
+; CHECK-NEXT: cmplw 5, 4
+; CHECK-NEXT: bgtlr 0
+; CHECK-NEXT: # %bb.2: # %entry
+; CHECK-NEXT: #
+; CHECK-NEXT: stwcx. 4, 0, 3
+; CHECK-NEXT: bne 0, .LBB3_1
+; CHECK-NEXT: # %bb.3: # %entry
+; CHECK-NEXT: blr
entry:
%0 = atomicrmw umax i32* %minimum, i32 %val monotonic
ret void
-; CHECK-LABEL: @a32umax
-; CHECK: lwarx [[OLDV:[0-9]+]], 0, 3
-; CHECK: cmplw 4, [[OLDV]]
-; CHECK: blelr 0
-; CHECK: stwcx. 4, 0, 3
-; CHECK: bne 0,
-; CHECK: blr
}
define void @a16min(i16* nocapture dereferenceable(4) %minimum, i16 %val) #1 {
+; CHECK-LABEL: a16min:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: extsh 4, 4
+; CHECK-NEXT: .LBB4_1: # %entry
+; CHECK-NEXT: #
+; CHECK-NEXT: lharx 5, 0, 3
+; CHECK-NEXT: extsh 5, 5
+; CHECK-NEXT: cmpw 5, 4
+; CHECK-NEXT: bltlr 0
+; CHECK-NEXT: # %bb.2: # %entry
+; CHECK-NEXT: #
+; CHECK-NEXT: sthcx. 4, 0, 3
+; CHECK-NEXT: bne 0, .LBB4_1
+; CHECK-NEXT: # %bb.3: # %entry
+; CHECK-NEXT: blr
entry:
%0 = atomicrmw min i16* %minimum, i16 %val monotonic
ret void
-; CHECK-LABEL: @a16min
-; CHECK: lharx [[OLDV:[0-9]+]], 0, 3
-; CHECK: cmpw 4, [[OLDV]]
-; CHECK: bgelr 0
-; CHECK: sthcx. 4, 0, 3
-; CHECK: bne 0,
-; CHECK: blr
}
define void @a16max(i16* nocapture dereferenceable(4) %minimum, i16 %val) #1 {
+; CHECK-LABEL: a16max:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: extsh 4, 4
+; CHECK-NEXT: .LBB5_1: # %entry
+; CHECK-NEXT: #
+; CHECK-NEXT: lharx 5, 0, 3
+; CHECK-NEXT: extsh 5, 5
+; CHECK-NEXT: cmpw 5, 4
+; CHECK-NEXT: bgtlr 0
+; CHECK-NEXT: # %bb.2: # %entry
+; CHECK-NEXT: #
+; CHECK-NEXT: sthcx. 4, 0, 3
+; CHECK-NEXT: bne 0, .LBB5_1
+; CHECK-NEXT: # %bb.3: # %entry
+; CHECK-NEXT: blr
entry:
%0 = atomicrmw max i16* %minimum, i16 %val monotonic
ret void
-; CHECK-LABEL: @a16max
-; CHECK: lharx [[OLDV:[0-9]+]], 0, 3
-; CHECK: cmpw 4, [[OLDV]]
-; CHECK: blelr 0
-; CHECK: sthcx. 4, 0, 3
-; CHECK: bne 0,
-; CHECK: blr
}
define void @a16umin(i16* nocapture dereferenceable(4) %minimum, i16 %val) #1 {
+; CHECK-LABEL: a16umin:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: .LBB6_1: # %entry
+; CHECK-NEXT: #
+; CHECK-NEXT: lharx 5, 0, 3
+; CHECK-NEXT: cmplw 5, 4
+; CHECK-NEXT: bltlr 0
+; CHECK-NEXT: # %bb.2: # %entry
+; CHECK-NEXT: #
+; CHECK-NEXT: sthcx. 4, 0, 3
+; CHECK-NEXT: bne 0, .LBB6_1
+; CHECK-NEXT: # %bb.3: # %entry
+; CHECK-NEXT: blr
entry:
%0 = atomicrmw umin i16* %minimum, i16 %val monotonic
ret void
-; CHECK-LABEL: @a16umin
-; CHECK: lharx [[OLDV:[0-9]+]], 0, 3
-; CHECK: cmplw 4, [[OLDV]]
-; CHECK: bgelr 0
-; CHECK: sthcx. 4, 0, 3
-; CHECK: bne 0,
-; CHECK: blr
}
define void @a16umax(i16* nocapture dereferenceable(4) %minimum, i16 %val) #1 {
+; CHECK-LABEL: a16umax:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: .LBB7_1: # %entry
+; CHECK-NEXT: #
+; CHECK-NEXT: lharx 5, 0, 3
+; CHECK-NEXT: cmplw 5, 4
+; CHECK-NEXT: bgtlr 0
+; CHECK-NEXT: # %bb.2: # %entry
+; CHECK-NEXT: #
+; CHECK-NEXT: sthcx. 4, 0, 3
+; CHECK-NEXT: bne 0, .LBB7_1
+; CHECK-NEXT: # %bb.3: # %entry
+; CHECK-NEXT: blr
entry:
%0 = atomicrmw umax i16* %minimum, i16 %val monotonic
ret void
-; CHECK-LABEL: @a16umax
-; CHECK: lharx [[OLDV:[0-9]+]], 0, 3
-; CHECK: cmplw 4, [[OLDV]]
-; CHECK: blelr 0
-; CHECK: sthcx. 4, 0, 3
-; CHECK: bne 0,
-; CHECK: blr
}
define void @a8min(i8* nocapture dereferenceable(4) %minimum, i8 %val) #1 {
+; CHECK-LABEL: a8min:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: extsb 4, 4
+; CHECK-NEXT: .LBB8_1: # %entry
+; CHECK-NEXT: #
+; CHECK-NEXT: lbarx 5, 0, 3
+; CHECK-NEXT: extsb 5, 5
+; CHECK-NEXT: cmpw 5, 4
+; CHECK-NEXT: bltlr 0
+; CHECK-NEXT: # %bb.2: # %entry
+; CHECK-NEXT: #
+; CHECK-NEXT: stbcx. 4, 0, 3
+; CHECK-NEXT: bne 0, .LBB8_1
+; CHECK-NEXT: # %bb.3: # %entry
+; CHECK-NEXT: blr
entry:
%0 = atomicrmw min i8* %minimum, i8 %val monotonic
ret void
-; CHECK-LABEL: @a8min
-; CHECK: lbarx [[OLDV:[0-9]+]], 0, 3
-; CHECK: cmpw 4, [[OLDV]]
-; CHECK: bgelr 0
-; CHECK: stbcx. 4, 0, 3
-; CHECK: bne 0,
-; CHECK: blr
}
define void @a8max(i8* nocapture dereferenceable(4) %minimum, i8 %val) #1 {
+; CHECK-LABEL: a8max:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: extsb 4, 4
+; CHECK-NEXT: .LBB9_1: # %entry
+; CHECK-NEXT: #
+; CHECK-NEXT: lbarx 5, 0, 3
+; CHECK-NEXT: extsb 5, 5
+; CHECK-NEXT: cmpw 5, 4
+; CHECK-NEXT: bgtlr 0
+; CHECK-NEXT: # %bb.2: # %entry
+; CHECK-NEXT: #
+; CHECK-NEXT: stbcx. 4, 0, 3
+; CHECK-NEXT: bne 0, .LBB9_1
+; CHECK-NEXT: # %bb.3: # %entry
+; CHECK-NEXT: blr
entry:
%0 = atomicrmw max i8* %minimum, i8 %val monotonic
ret void
-; CHECK-LABEL: @a8max
-; CHECK: lbarx [[OLDV:[0-9]+]], 0, 3
-; CHECK: cmpw 4, [[OLDV]]
-; CHECK: blelr 0
-; CHECK: stbcx. 4, 0, 3
-; CHECK: bne 0,
-; CHECK: blr
}
define void @a8umin(i8* nocapture dereferenceable(4) %minimum, i8 %val) #1 {
+; CHECK-LABEL: a8umin:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: .LBB10_1: # %entry
+; CHECK-NEXT: #
+; CHECK-NEXT: lbarx 5, 0, 3
+; CHECK-NEXT: cmplw 5, 4
+; CHECK-NEXT: bltlr 0
+; CHECK-NEXT: # %bb.2: # %entry
+; CHECK-NEXT: #
+; CHECK-NEXT: stbcx. 4, 0, 3
+; CHECK-NEXT: bne 0, .LBB10_1
+; CHECK-NEXT: # %bb.3: # %entry
+; CHECK-NEXT: blr
entry:
%0 = atomicrmw umin i8* %minimum, i8 %val monotonic
ret void
-; CHECK-LABEL: @a8umin
-; CHECK: lbarx [[OLDV:[0-9]+]], 0, 3
-; CHECK: cmplw 4, [[OLDV]]
-; CHECK: bgelr 0
-; CHECK: stbcx. 4, 0, 3
-; CHECK: bne 0,
-; CHECK: blr
}
define void @a8umax(i8* nocapture dereferenceable(4) %minimum, i8 %val) #1 {
+; CHECK-LABEL: a8umax:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: .LBB11_1: # %entry
+; CHECK-NEXT: #
+; CHECK-NEXT: lbarx 5, 0, 3
+; CHECK-NEXT: cmplw 5, 4
+; CHECK-NEXT: bgtlr 0
+; CHECK-NEXT: # %bb.2: # %entry
+; CHECK-NEXT: #
+; CHECK-NEXT: stbcx. 4, 0, 3
+; CHECK-NEXT: bne 0, .LBB11_1
+; CHECK-NEXT: # %bb.3: # %entry
+; CHECK-NEXT: blr
entry:
%0 = atomicrmw umax i8* %minimum, i8 %val monotonic
ret void
-; CHECK-LABEL: @a8umax
-; CHECK: lbarx [[OLDV:[0-9]+]], 0, 3
-; CHECK: cmplw 4, [[OLDV]]
-; CHECK: blelr 0
-; CHECK: stbcx. 4, 0, 3
-; CHECK: bne 0,
-; CHECK: blr
}
define void @a64min(i64* nocapture dereferenceable(4) %minimum, i64 %val) #0 {
+; CHECK-LABEL: a64min:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: .LBB12_1: # %entry
+; CHECK-NEXT: #
+; CHECK-NEXT: ldarx 5, 0, 3
+; CHECK-NEXT: cmpd 5, 4
+; CHECK-NEXT: bltlr 0
+; CHECK-NEXT: # %bb.2: # %entry
+; CHECK-NEXT: #
+; CHECK-NEXT: stdcx. 4, 0, 3
+; CHECK-NEXT: bne 0, .LBB12_1
+; CHECK-NEXT: # %bb.3: # %entry
+; CHECK-NEXT: blr
entry:
%0 = atomicrmw min i64* %minimum, i64 %val monotonic
ret void
-; CHECK-LABEL: @a64min
-; CHECK: ldarx [[OLDV:[0-9]+]], 0, 3
-; CHECK: cmpd 4, [[OLDV]]
-; CHECK: bgelr 0
-; CHECK: stdcx. 4, 0, 3
-; CHECK: bne 0,
-; CHECK: blr
}
define void @a64max(i64* nocapture dereferenceable(4) %minimum, i64 %val) #0 {
+; CHECK-LABEL: a64max:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: .LBB13_1: # %entry
+; CHECK-NEXT: #
+; CHECK-NEXT: ldarx 5, 0, 3
+; CHECK-NEXT: cmpd 5, 4
+; CHECK-NEXT: bgtlr 0
+; CHECK-NEXT: # %bb.2: # %entry
+; CHECK-NEXT: #
+; CHECK-NEXT: stdcx. 4, 0, 3
+; CHECK-NEXT: bne 0, .LBB13_1
+; CHECK-NEXT: # %bb.3: # %entry
+; CHECK-NEXT: blr
entry:
%0 = atomicrmw max i64* %minimum, i64 %val monotonic
ret void
-; CHECK-LABEL: @a64max
-; CHECK: ldarx [[OLDV:[0-9]+]], 0, 3
-; CHECK: cmpd 4, [[OLDV]]
-; CHECK: blelr 0
-; CHECK: stdcx. 4, 0, 3
-; CHECK: bne 0,
-; CHECK: blr
}
define void @a64umin(i64* nocapture dereferenceable(4) %minimum, i64 %val) #0 {
+; CHECK-LABEL: a64umin:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: .LBB14_1: # %entry
+; CHECK-NEXT: #
+; CHECK-NEXT: ldarx 5, 0, 3
+; CHECK-NEXT: cmpld 5, 4
+; CHECK-NEXT: bltlr 0
+; CHECK-NEXT: # %bb.2: # %entry
+; CHECK-NEXT: #
+; CHECK-NEXT: stdcx. 4, 0, 3
+; CHECK-NEXT: bne 0, .LBB14_1
+; CHECK-NEXT: # %bb.3: # %entry
+; CHECK-NEXT: blr
entry:
%0 = atomicrmw umin i64* %minimum, i64 %val monotonic
ret void
-; CHECK-LABEL: @a64umin
-; CHECK: ldarx [[OLDV:[0-9]+]], 0, 3
-; CHECK: cmpld 4, [[OLDV]]
-; CHECK: bgelr 0
-; CHECK: stdcx. 4, 0, 3
-; CHECK: bne 0,
-; CHECK: blr
}
define void @a64umax(i64* nocapture dereferenceable(4) %minimum, i64 %val) #0 {
+; CHECK-LABEL: a64umax:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: .LBB15_1: # %entry
+; CHECK-NEXT: #
+; CHECK-NEXT: ldarx 5, 0, 3
+; CHECK-NEXT: cmpld 5, 4
+; CHECK-NEXT: bgtlr 0
+; CHECK-NEXT: # %bb.2: # %entry
+; CHECK-NEXT: #
+; CHECK-NEXT: stdcx. 4, 0, 3
+; CHECK-NEXT: bne 0, .LBB15_1
+; CHECK-NEXT: # %bb.3: # %entry
+; CHECK-NEXT: blr
entry:
%0 = atomicrmw umax i64* %minimum, i64 %val monotonic
ret void
-; CHECK-LABEL: @a64umax
-; CHECK: ldarx [[OLDV:[0-9]+]], 0, 3
-; CHECK: cmpld 4, [[OLDV]]
-; CHECK: blelr 0
-; CHECK: stdcx. 4, 0, 3
-; CHECK: bne 0,
-; CHECK: blr
}
define void @ae16min(i16* nocapture dereferenceable(4) %minimum, i16 %val) #0 {
+; CHECK-LABEL: ae16min:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: li 5, 0
+; CHECK-NEXT: rlwinm 6, 3, 3, 27, 27
+; CHECK-NEXT: ori 7, 5, 65535
+; CHECK-NEXT: xori 5, 6, 16
+; CHECK-NEXT: slw 8, 4, 5
+; CHECK-NEXT: slw 6, 7, 5
+; CHECK-NEXT: rldicr 3, 3, 0, 61
+; CHECK-NEXT: and 7, 8, 6
+; CHECK-NEXT: .LBB16_1: # %entry
+; CHECK-NEXT: #
+; CHECK-NEXT: lwarx 8, 0, 3
+; CHECK-NEXT: and 9, 8, 6
+; CHECK-NEXT: srw 9, 9, 5
+; CHECK-NEXT: extsh 9, 9
+; CHECK-NEXT: cmpw 9, 4
+; CHECK-NEXT: bltlr 0
+; CHECK-NEXT: # %bb.2: # %entry
+; CHECK-NEXT: #
+; CHECK-NEXT: andc 8, 8, 6
+; CHECK-NEXT: or 8, 7, 8
+; CHECK-NEXT: stwcx. 8, 0, 3
+; CHECK-NEXT: bne 0, .LBB16_1
+; CHECK-NEXT: # %bb.3: # %entry
+; CHECK-NEXT: blr
entry:
%0 = atomicrmw min i16* %minimum, i16 %val monotonic
ret void
-; CHECK-LABEL: @ae16min
-; CHECK-DAG: rlwinm [[SA1:[0-9]+]], 3, 3, 27, 27
-; CHECK-DAG: li [[M1:[0-9]+]], 0
-; CHECK-DAG: rldicr 3, 3, 0, 61
-; CHECK-DAG: xori [[SA:[0-9]+]], [[SA1]], 16
-; CHECK-DAG: ori [[M2:[0-9]+]], [[M1]], 65535
-; CHECK-DAG: slw [[SV:[0-9]+]], 4, [[SA]]
-; CHECK-DAG: slw [[M:[0-9]+]], [[M2]], [[SA]]
-; CHECK-DAG: and [[SMV:[0-9]+]], [[SV]], [[M]]
-; CHECK: lwarx [[OLDV:[0-9]+]], 0, 3
-; CHECK: and [[MOLDV:[0-9]+]], [[OLDV]], [[M]]
-; CHECK: srw [[SMOLDV:[0-9]+]], [[MOLDV]], [[SA]]
-; CHECK: extsh [[SESMOLDV:[0-9]+]], [[SMOLDV]]
-; CHECK: cmpw 4, [[SESMOLDV]]
-; CHECK: bgelr 0
-; CHECK: andc [[NOLDV:[0-9]+]], [[OLDV]], [[M]]
-; CHECK: or [[NEWV:[0-9]+]], [[SMV]], [[NOLDV]]
-; CHECK: stwcx. [[NEWV]], 0, 3
-; CHECK: bne 0,
-; CHECK: blr
}
define void @ae16max(i16* nocapture dereferenceable(4) %minimum, i16 %val) #0 {
+; CHECK-LABEL: ae16max:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: li 5, 0
+; CHECK-NEXT: rlwinm 6, 3, 3, 27, 27
+; CHECK-NEXT: ori 7, 5, 65535
+; CHECK-NEXT: xori 5, 6, 16
+; CHECK-NEXT: slw 8, 4, 5
+; CHECK-NEXT: slw 6, 7, 5
+; CHECK-NEXT: rldicr 3, 3, 0, 61
+; CHECK-NEXT: and 7, 8, 6
+; CHECK-NEXT: .LBB17_1: # %entry
+; CHECK-NEXT: #
+; CHECK-NEXT: lwarx 8, 0, 3
+; CHECK-NEXT: and 9, 8, 6
+; CHECK-NEXT: srw 9, 9, 5
+; CHECK-NEXT: extsh 9, 9
+; CHECK-NEXT: cmpw 9, 4
+; CHECK-NEXT: bgtlr 0
+; CHECK-NEXT: # %bb.2: # %entry
+; CHECK-NEXT: #
+; CHECK-NEXT: andc 8, 8, 6
+; CHECK-NEXT: or 8, 7, 8
+; CHECK-NEXT: stwcx. 8, 0, 3
+; CHECK-NEXT: bne 0, .LBB17_1
+; CHECK-NEXT: # %bb.3: # %entry
+; CHECK-NEXT: blr
entry:
%0 = atomicrmw max i16* %minimum, i16 %val monotonic
ret void
-; CHECK-LABEL: @ae16max
-; CHECK-DAG: rlwinm [[SA1:[0-9]+]], 3, 3, 27, 27
-; CHECK-DAG: li [[M1:[0-9]+]], 0
-; CHECK-DAG: rldicr 3, 3, 0, 61
-; CHECK-DAG: xori [[SA:[0-9]+]], [[SA1]], 16
-; CHECK-DAG: ori [[M2:[0-9]+]], [[M1]], 65535
-; CHECK-DAG: slw [[SV:[0-9]+]], 4, [[SA]]
-; CHECK-DAG: slw [[M:[0-9]+]], [[M2]], [[SA]]
-; CHECK-DAG: and [[SMV:[0-9]+]], [[SV]], [[M]]
-; CHECK: lwarx [[OLDV:[0-9]+]], 0, 3
-; CHECK: and [[MOLDV:[0-9]+]], [[OLDV]], [[M]]
-; CHECK: srw [[SMOLDV:[0-9]+]], [[MOLDV]], [[SA]]
-; CHECK: extsh [[SESMOLDV:[0-9]+]], [[SMOLDV]]
-; CHECK: cmpw 4, [[SESMOLDV]]
-; CHECK: blelr 0
-; CHECK: andc [[NOLDV:[0-9]+]], [[OLDV]], [[M]]
-; CHECK: or [[NEWV:[0-9]+]], [[SMV]], [[NOLDV]]
-; CHECK: stwcx. [[NEWV]], 0, 3
-; CHECK: bne 0,
-; CHECK: blr
}
define void @ae16umin(i16* nocapture dereferenceable(4) %minimum, i16 %val) #0 {
+; CHECK-LABEL: ae16umin:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: li 5, 0
+; CHECK-NEXT: rlwinm 6, 3, 3, 27, 27
+; CHECK-NEXT: ori 5, 5, 65535
+; CHECK-NEXT: xori 6, 6, 16
+; CHECK-NEXT: slw 4, 4, 6
+; CHECK-NEXT: slw 5, 5, 6
+; CHECK-NEXT: rldicr 3, 3, 0, 61
+; CHECK-NEXT: and 6, 4, 5
+; CHECK-NEXT: .LBB18_1: # %entry
+; CHECK-NEXT: #
+; CHECK-NEXT: lwarx 7, 0, 3
+; CHECK-NEXT: and 8, 7, 5
+; CHECK-NEXT: cmplw 8, 4
+; CHECK-NEXT: bltlr 0
+; CHECK-NEXT: # %bb.2: # %entry
+; CHECK-NEXT: #
+; CHECK-NEXT: andc 7, 7, 5
+; CHECK-NEXT: or 7, 6, 7
+; CHECK-NEXT: stwcx. 7, 0, 3
+; CHECK-NEXT: bne 0, .LBB18_1
+; CHECK-NEXT: # %bb.3: # %entry
+; CHECK-NEXT: blr
entry:
%0 = atomicrmw umin i16* %minimum, i16 %val monotonic
ret void
-; CHECK-LABEL: @ae16umin
-; CHECK-DAG: rlwinm [[SA1:[0-9]+]], 3, 3, 27, 27
-; CHECK-DAG: li [[M1:[0-9]+]], 0
-; CHECK-DAG: rldicr 3, 3, 0, 61
-; CHECK-DAG: xori [[SA:[0-9]+]], [[SA1]], 16
-; CHECK-DAG: ori [[M2:[0-9]+]], [[M1]], 65535
-; CHECK-DAG: slw [[SV:[0-9]+]], 4, [[SA]]
-; CHECK-DAG: slw [[M:[0-9]+]], [[M2]], [[SA]]
-; CHECK-DAG: and [[SMV:[0-9]+]], [[SV]], [[M]]
-; CHECK: lwarx [[OLDV:[0-9]+]], 0, 3
-; CHECK: and [[MOLDV:[0-9]+]], [[OLDV]], [[M]]
-; CHECK: cmplw 4, [[MOLDV]]
-; CHECK: bgelr 0
-; CHECK: andc [[NOLDV:[0-9]+]], [[OLDV]], [[M]]
-; CHECK: or [[NEWV:[0-9]+]], [[SMV]], [[NOLDV]]
-; CHECK: stwcx. [[NEWV]], 0, 3
-; CHECK: bne 0,
-; CHECK: blr
}
define void @ae16umax(i16* nocapture dereferenceable(4) %minimum, i16 %val) #0 {
+; CHECK-LABEL: ae16umax:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: li 5, 0
+; CHECK-NEXT: rlwinm 6, 3, 3, 27, 27
+; CHECK-NEXT: ori 5, 5, 65535
+; CHECK-NEXT: xori 6, 6, 16
+; CHECK-NEXT: slw 4, 4, 6
+; CHECK-NEXT: slw 5, 5, 6
+; CHECK-NEXT: rldicr 3, 3, 0, 61
+; CHECK-NEXT: and 6, 4, 5
+; CHECK-NEXT: .LBB19_1: # %entry
+; CHECK-NEXT: #
+; CHECK-NEXT: lwarx 7, 0, 3
+; CHECK-NEXT: and 8, 7, 5
+; CHECK-NEXT: cmplw 8, 4
+; CHECK-NEXT: bgtlr 0
+; CHECK-NEXT: # %bb.2: # %entry
+; CHECK-NEXT: #
+; CHECK-NEXT: andc 7, 7, 5
+; CHECK-NEXT: or 7, 6, 7
+; CHECK-NEXT: stwcx. 7, 0, 3
+; CHECK-NEXT: bne 0, .LBB19_1
+; CHECK-NEXT: # %bb.3: # %entry
+; CHECK-NEXT: blr
entry:
%0 = atomicrmw umax i16* %minimum, i16 %val monotonic
ret void
-; CHECK-LABEL: @ae16umax
-; CHECK-DAG: rlwinm [[SA1:[0-9]+]], 3, 3, 27, 27
-; CHECK-DAG: li [[M1:[0-9]+]], 0
-; CHECK-DAG: rldicr 3, 3, 0, 61
-; CHECK-DAG: xori [[SA:[0-9]+]], [[SA1]], 16
-; CHECK-DAG: ori [[M2:[0-9]+]], [[M1]], 65535
-; CHECK-DAG: slw [[SV:[0-9]+]], 4, [[SA]]
-; CHECK-DAG: slw [[M:[0-9]+]], [[M2]], [[SA]]
-; CHECK-DAG: and [[SMV:[0-9]+]], [[SV]], [[M]]
-; CHECK: lwarx [[OLDV:[0-9]+]], 0, 3
-; CHECK: and [[MOLDV:[0-9]+]], [[OLDV]], [[M]]
-; CHECK: cmplw 4, [[MOLDV]]
-; CHECK: blelr 0
-; CHECK: andc [[NOLDV:[0-9]+]], [[OLDV]], [[M]]
-; CHECK: or [[NEWV:[0-9]+]], [[SMV]], [[NOLDV]]
-; CHECK: stwcx. [[NEWV]], 0, 3
-; CHECK: bne 0,
-; CHECK: blr
}
define void @ae8min(i8* nocapture dereferenceable(4) %minimum, i8 %val) #0 {
+; CHECK-LABEL: ae8min:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rlwinm 5, 3, 3, 27, 28
+; CHECK-NEXT: li 6, 255
+; CHECK-NEXT: xori 5, 5, 24
+; CHECK-NEXT: rldicr 3, 3, 0, 61
+; CHECK-NEXT: slw 7, 4, 5
+; CHECK-NEXT: slw 6, 6, 5
+; CHECK-NEXT: and 7, 7, 6
+; CHECK-NEXT: .LBB20_1: # %entry
+; CHECK-NEXT: #
+; CHECK-NEXT: lwarx 8, 0, 3
+; CHECK-NEXT: and 9, 8, 6
+; CHECK-NEXT: srw 9, 9, 5
+; CHECK-NEXT: extsb 9, 9
+; CHECK-NEXT: cmpw 9, 4
+; CHECK-NEXT: bltlr 0
+; CHECK-NEXT: # %bb.2: # %entry
+; CHECK-NEXT: #
+; CHECK-NEXT: andc 8, 8, 6
+; CHECK-NEXT: or 8, 7, 8
+; CHECK-NEXT: stwcx. 8, 0, 3
+; CHECK-NEXT: bne 0, .LBB20_1
+; CHECK-NEXT: # %bb.3: # %entry
+; CHECK-NEXT: blr
entry:
%0 = atomicrmw min i8* %minimum, i8 %val monotonic
ret void
-; CHECK-LABEL: @ae8min
-; CHECK-DAG: rlwinm [[SA1:[0-9]+]], 3, 3, 27, 28
-; CHECK-DAG: li [[M1:[0-9]+]], 255
-; CHECK-DAG: rldicr 3, 3, 0, 61
-; CHECK-DAG: xori [[SA:[0-9]+]], [[SA1]], 24
-; CHECK-DAG: slw [[SV:[0-9]+]], 4, [[SA]]
-; CHECK-DAG: slw [[M:[0-9]+]], [[M1]], [[SA]]
-; CHECK-DAG: and [[SMV:[0-9]+]], [[SV]], [[M]]
-; CHECK: lwarx [[OLDV:[0-9]+]], 0, 3
-; CHECK: and [[MOLDV:[0-9]+]], [[OLDV]], [[M]]
-; CHECK: srw [[SMOLDV:[0-9]+]], [[MOLDV]], [[SA]]
-; CHECK: extsb [[SESMOLDV:[0-9]+]], [[SMOLDV]]
-; CHECK: cmpw 4, [[SESMOLDV]]
-; CHECK: bgelr 0
-; CHECK: andc [[NOLDV:[0-9]+]], [[OLDV]], [[M]]
-; CHECK: or [[NEWV:[0-9]+]], [[SMV]], [[NOLDV]]
-; CHECK: stwcx. [[NEWV]], 0, 3
-; CHECK: bne 0,
-; CHECK: blr
}
define void @ae8max(i8* nocapture dereferenceable(4) %minimum, i8 %val) #0 {
+; CHECK-LABEL: ae8max:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rlwinm 5, 3, 3, 27, 28
+; CHECK-NEXT: li 6, 255
+; CHECK-NEXT: xori 5, 5, 24
+; CHECK-NEXT: rldicr 3, 3, 0, 61
+; CHECK-NEXT: slw 7, 4, 5
+; CHECK-NEXT: slw 6, 6, 5
+; CHECK-NEXT: and 7, 7, 6
+; CHECK-NEXT: .LBB21_1: # %entry
+; CHECK-NEXT: #
+; CHECK-NEXT: lwarx 8, 0, 3
+; CHECK-NEXT: and 9, 8, 6
+; CHECK-NEXT: srw 9, 9, 5
+; CHECK-NEXT: extsb 9, 9
+; CHECK-NEXT: cmpw 9, 4
+; CHECK-NEXT: bgtlr 0
+; CHECK-NEXT: # %bb.2: # %entry
+; CHECK-NEXT: #
+; CHECK-NEXT: andc 8, 8, 6
+; CHECK-NEXT: or 8, 7, 8
+; CHECK-NEXT: stwcx. 8, 0, 3
+; CHECK-NEXT: bne 0, .LBB21_1
+; CHECK-NEXT: # %bb.3: # %entry
+; CHECK-NEXT: blr
entry:
%0 = atomicrmw max i8* %minimum, i8 %val monotonic
ret void
-; CHECK-LABEL: @ae8max
-; CHECK-DAG: rlwinm [[SA1:[0-9]+]], 3, 3, 27, 28
-; CHECK-DAG: li [[M1:[0-9]+]], 255
-; CHECK-DAG: rldicr 3, 3, 0, 61
-; CHECK-DAG: xori [[SA:[0-9]+]], [[SA1]], 24
-; CHECK-DAG: slw [[SV:[0-9]+]], 4, [[SA]]
-; CHECK-DAG: slw [[M:[0-9]+]], [[M1]], [[SA]]
-; CHECK-DAG: and [[SMV:[0-9]+]], [[SV]], [[M]]
-; CHECK: lwarx [[OLDV:[0-9]+]], 0, 3
-; CHECK: and [[MOLDV:[0-9]+]], [[OLDV]], [[M]]
-; CHECK: srw [[SMOLDV:[0-9]+]], [[MOLDV]], [[SA]]
-; CHECK: extsb [[SESMOLDV:[0-9]+]], [[SMOLDV]]
-; CHECK: cmpw 4, [[SESMOLDV]]
-; CHECK: blelr 0
-; CHECK: andc [[NOLDV:[0-9]+]], [[OLDV]], [[M]]
-; CHECK: or [[NEWV:[0-9]+]], [[SMV]], [[NOLDV]]
-; CHECK: stwcx. [[NEWV]], 0, 3
-; CHECK: bne 0,
-; CHECK: blr
}
define void @ae8umin(i8* nocapture dereferenceable(4) %minimum, i8 %val) #0 {
+; CHECK-LABEL: ae8umin:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rlwinm 6, 3, 3, 27, 28
+; CHECK-NEXT: li 5, 255
+; CHECK-NEXT: xori 6, 6, 24
+; CHECK-NEXT: rldicr 3, 3, 0, 61
+; CHECK-NEXT: slw 4, 4, 6
+; CHECK-NEXT: slw 5, 5, 6
+; CHECK-NEXT: and 6, 4, 5
+; CHECK-NEXT: .LBB22_1: # %entry
+; CHECK-NEXT: #
+; CHECK-NEXT: lwarx 7, 0, 3
+; CHECK-NEXT: and 8, 7, 5
+; CHECK-NEXT: cmplw 8, 4
+; CHECK-NEXT: bltlr 0
+; CHECK-NEXT: # %bb.2: # %entry
+; CHECK-NEXT: #
+; CHECK-NEXT: andc 7, 7, 5
+; CHECK-NEXT: or 7, 6, 7
+; CHECK-NEXT: stwcx. 7, 0, 3
+; CHECK-NEXT: bne 0, .LBB22_1
+; CHECK-NEXT: # %bb.3: # %entry
+; CHECK-NEXT: blr
entry:
%0 = atomicrmw umin i8* %minimum, i8 %val monotonic
ret void
-; CHECK-LABEL: @ae8umin
-; CHECK-DAG: rlwinm [[SA1:[0-9]+]], 3, 3, 27, 28
-; CHECK-DAG: li [[M1:[0-9]+]], 255
-; CHECK-DAG: rldicr 3, 3, 0, 61
-; CHECK-DAG: xori [[SA:[0-9]+]], [[SA1]], 24
-; CHECK-DAG: slw [[SV:[0-9]+]], 4, [[SA]]
-; CHECK-DAG: slw [[M:[0-9]+]], [[M1]], [[SA]]
-; CHECK-DAG: and [[SMV:[0-9]+]], [[SV]], [[M]]
-; CHECK: lwarx [[OLDV:[0-9]+]], 0, 3
-; CHECK: and [[MOLDV:[0-9]+]], [[OLDV]], [[M]]
-; CHECK: cmplw 4, [[MOLDV]]
-; CHECK: bgelr 0
-; CHECK: andc [[NOLDV:[0-9]+]], [[OLDV]], [[M]]
-; CHECK: or [[NEWV:[0-9]+]], [[SMV]], [[NOLDV]]
-; CHECK: stwcx. [[NEWV]], 0, 3
-; CHECK: bne 0,
-; CHECK: blr
}
define void @ae8umax(i8* nocapture dereferenceable(4) %minimum, i8 %val) #0 {
+; CHECK-LABEL: ae8umax:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: rlwinm 6, 3, 3, 27, 28
+; CHECK-NEXT: li 5, 255
+; CHECK-NEXT: xori 6, 6, 24
+; CHECK-NEXT: rldicr 3, 3, 0, 61
+; CHECK-NEXT: slw 4, 4, 6
+; CHECK-NEXT: slw 5, 5, 6
+; CHECK-NEXT: and 6, 4, 5
+; CHECK-NEXT: .LBB23_1: # %entry
+; CHECK-NEXT: #
+; CHECK-NEXT: lwarx 7, 0, 3
+; CHECK-NEXT: and 8, 7, 5
+; CHECK-NEXT: cmplw 8, 4
+; CHECK-NEXT: bgtlr 0
+; CHECK-NEXT: # %bb.2: # %entry
+; CHECK-NEXT: #
+; CHECK-NEXT: andc 7, 7, 5
+; CHECK-NEXT: or 7, 6, 7
+; CHECK-NEXT: stwcx. 7, 0, 3
+; CHECK-NEXT: bne 0, .LBB23_1
+; CHECK-NEXT: # %bb.3: # %entry
+; CHECK-NEXT: blr
entry:
%0 = atomicrmw umax i8* %minimum, i8 %val monotonic
ret void
-; CHECK-LABEL: @ae8umax
-; CHECK-DAG: rlwinm [[SA1:[0-9]+]], 3, 3, 27, 28
-; CHECK-DAG: li [[M1:[0-9]+]], 255
-; CHECK-DAG: rldicr 3, 3, 0, 61
-; CHECK-DAG: xori [[SA:[0-9]+]], [[SA1]], 24
-; CHECK-DAG: slw [[SV:[0-9]+]], 4, [[SA]]
-; CHECK-DAG: slw [[M:[0-9]+]], [[M1]], [[SA]]
-; CHECK-DAG: and [[SMV:[0-9]+]], [[SV]], [[M]]
-; CHECK: lwarx [[OLDV:[0-9]+]], 0, 3
-; CHECK: and [[MOLDV:[0-9]+]], [[OLDV]], [[M]]
-; CHECK: cmplw 4, [[MOLDV]]
-; CHECK: blelr 0
-; CHECK: andc [[NOLDV:[0-9]+]], [[OLDV]], [[M]]
-; CHECK: or [[NEWV:[0-9]+]], [[SMV]], [[NOLDV]]
-; CHECK: stwcx. [[NEWV]], 0, 3
-; CHECK: bne 0,
-; CHECK: blr
}
attributes #0 = { nounwind "target-cpu"="ppc64" }
; PPC64LE-NEXT: clrlwi 4, 4, 24
; PPC64LE-NEXT: .LBB40_1:
; PPC64LE-NEXT: lbarx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB40_3
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bnelr 0
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 5, 0, 3
-; PPC64LE-NEXT: beqlr 0
-; PPC64LE-NEXT: b .LBB40_1
-; PPC64LE-NEXT: .LBB40_3:
-; PPC64LE-NEXT: stbcx. 6, 0, 3
+; PPC64LE-NEXT: bne 0, .LBB40_1
+; PPC64LE-NEXT: # %bb.3:
; PPC64LE-NEXT: blr
%res = cmpxchg i8* %ptr, i8 %cmp, i8 %val monotonic monotonic
ret void
; PPC64LE-NEXT: clrlwi 4, 4, 24
; PPC64LE-NEXT: .LBB41_1:
; PPC64LE-NEXT: lbarx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB41_4
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bne 0, .LBB41_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB41_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB41_4:
-; PPC64LE-NEXT: stbcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB41_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i8* %ptr, i8 %cmp, i8 %val acquire monotonic
; PPC64LE-NEXT: clrlwi 4, 4, 24
; PPC64LE-NEXT: .LBB42_1:
; PPC64LE-NEXT: lbarx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB42_4
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bne 0, .LBB42_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB42_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB42_4:
-; PPC64LE-NEXT: stbcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB42_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i8* %ptr, i8 %cmp, i8 %val acquire acquire
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB43_1:
; PPC64LE-NEXT: lbarx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB43_3
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bnelr 0
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 5, 0, 3
-; PPC64LE-NEXT: beqlr 0
-; PPC64LE-NEXT: b .LBB43_1
-; PPC64LE-NEXT: .LBB43_3:
-; PPC64LE-NEXT: stbcx. 6, 0, 3
+; PPC64LE-NEXT: bne 0, .LBB43_1
+; PPC64LE-NEXT: # %bb.3:
; PPC64LE-NEXT: blr
%res = cmpxchg i8* %ptr, i8 %cmp, i8 %val release monotonic
ret void
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB44_1:
; PPC64LE-NEXT: lbarx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB44_4
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bne 0, .LBB44_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB44_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB44_4:
-; PPC64LE-NEXT: stbcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB44_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i8* %ptr, i8 %cmp, i8 %val release acquire
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB45_1:
; PPC64LE-NEXT: lbarx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB45_4
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bne 0, .LBB45_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB45_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB45_4:
-; PPC64LE-NEXT: stbcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB45_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i8* %ptr, i8 %cmp, i8 %val acq_rel monotonic
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB46_1:
; PPC64LE-NEXT: lbarx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB46_4
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bne 0, .LBB46_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB46_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB46_4:
-; PPC64LE-NEXT: stbcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB46_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i8* %ptr, i8 %cmp, i8 %val acq_rel acquire
; PPC64LE-NEXT: sync
; PPC64LE-NEXT: .LBB47_1:
; PPC64LE-NEXT: lbarx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB47_4
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bne 0, .LBB47_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB47_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB47_4:
-; PPC64LE-NEXT: stbcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB47_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i8* %ptr, i8 %cmp, i8 %val seq_cst monotonic
; PPC64LE-NEXT: sync
; PPC64LE-NEXT: .LBB48_1:
; PPC64LE-NEXT: lbarx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB48_4
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bne 0, .LBB48_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB48_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB48_4:
-; PPC64LE-NEXT: stbcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB48_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i8* %ptr, i8 %cmp, i8 %val seq_cst acquire
; PPC64LE-NEXT: sync
; PPC64LE-NEXT: .LBB49_1:
; PPC64LE-NEXT: lbarx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB49_4
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bne 0, .LBB49_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB49_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB49_4:
-; PPC64LE-NEXT: stbcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB49_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i8* %ptr, i8 %cmp, i8 %val seq_cst seq_cst
; PPC64LE-NEXT: clrlwi 4, 4, 16
; PPC64LE-NEXT: .LBB50_1:
; PPC64LE-NEXT: lharx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB50_3
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bnelr 0
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 5, 0, 3
-; PPC64LE-NEXT: beqlr 0
-; PPC64LE-NEXT: b .LBB50_1
-; PPC64LE-NEXT: .LBB50_3:
-; PPC64LE-NEXT: sthcx. 6, 0, 3
+; PPC64LE-NEXT: bne 0, .LBB50_1
+; PPC64LE-NEXT: # %bb.3:
; PPC64LE-NEXT: blr
%res = cmpxchg i16* %ptr, i16 %cmp, i16 %val monotonic monotonic
ret void
; PPC64LE-NEXT: clrlwi 4, 4, 16
; PPC64LE-NEXT: .LBB51_1:
; PPC64LE-NEXT: lharx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB51_4
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bne 0, .LBB51_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB51_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB51_4:
-; PPC64LE-NEXT: sthcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB51_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i16* %ptr, i16 %cmp, i16 %val acquire monotonic
; PPC64LE-NEXT: clrlwi 4, 4, 16
; PPC64LE-NEXT: .LBB52_1:
; PPC64LE-NEXT: lharx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB52_4
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bne 0, .LBB52_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB52_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB52_4:
-; PPC64LE-NEXT: sthcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB52_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i16* %ptr, i16 %cmp, i16 %val acquire acquire
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB53_1:
; PPC64LE-NEXT: lharx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB53_3
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bnelr 0
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 5, 0, 3
-; PPC64LE-NEXT: beqlr 0
-; PPC64LE-NEXT: b .LBB53_1
-; PPC64LE-NEXT: .LBB53_3:
-; PPC64LE-NEXT: sthcx. 6, 0, 3
+; PPC64LE-NEXT: bne 0, .LBB53_1
+; PPC64LE-NEXT: # %bb.3:
; PPC64LE-NEXT: blr
%res = cmpxchg i16* %ptr, i16 %cmp, i16 %val release monotonic
ret void
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB54_1:
; PPC64LE-NEXT: lharx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB54_4
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bne 0, .LBB54_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB54_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB54_4:
-; PPC64LE-NEXT: sthcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB54_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i16* %ptr, i16 %cmp, i16 %val release acquire
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB55_1:
; PPC64LE-NEXT: lharx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB55_4
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bne 0, .LBB55_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB55_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB55_4:
-; PPC64LE-NEXT: sthcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB55_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i16* %ptr, i16 %cmp, i16 %val acq_rel monotonic
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB56_1:
; PPC64LE-NEXT: lharx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB56_4
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bne 0, .LBB56_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB56_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB56_4:
-; PPC64LE-NEXT: sthcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB56_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i16* %ptr, i16 %cmp, i16 %val acq_rel acquire
; PPC64LE-NEXT: sync
; PPC64LE-NEXT: .LBB57_1:
; PPC64LE-NEXT: lharx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB57_4
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bne 0, .LBB57_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB57_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB57_4:
-; PPC64LE-NEXT: sthcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB57_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i16* %ptr, i16 %cmp, i16 %val seq_cst monotonic
; PPC64LE-NEXT: sync
; PPC64LE-NEXT: .LBB58_1:
; PPC64LE-NEXT: lharx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB58_4
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bne 0, .LBB58_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB58_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB58_4:
-; PPC64LE-NEXT: sthcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB58_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i16* %ptr, i16 %cmp, i16 %val seq_cst acquire
; PPC64LE-NEXT: sync
; PPC64LE-NEXT: .LBB59_1:
; PPC64LE-NEXT: lharx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB59_4
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bne 0, .LBB59_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB59_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB59_4:
-; PPC64LE-NEXT: sthcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB59_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i16* %ptr, i16 %cmp, i16 %val seq_cst seq_cst
; PPC64LE: # %bb.0:
; PPC64LE-NEXT: .LBB60_1:
; PPC64LE-NEXT: lwarx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB60_3
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bnelr 0
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 5, 0, 3
-; PPC64LE-NEXT: beqlr 0
-; PPC64LE-NEXT: b .LBB60_1
-; PPC64LE-NEXT: .LBB60_3:
-; PPC64LE-NEXT: stwcx. 6, 0, 3
+; PPC64LE-NEXT: bne 0, .LBB60_1
+; PPC64LE-NEXT: # %bb.3:
; PPC64LE-NEXT: blr
%res = cmpxchg i32* %ptr, i32 %cmp, i32 %val monotonic monotonic
ret void
; PPC64LE: # %bb.0:
; PPC64LE-NEXT: .LBB61_1:
; PPC64LE-NEXT: lwarx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB61_4
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bne 0, .LBB61_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB61_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB61_4:
-; PPC64LE-NEXT: stwcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB61_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i32* %ptr, i32 %cmp, i32 %val acquire monotonic
; PPC64LE: # %bb.0:
; PPC64LE-NEXT: .LBB62_1:
; PPC64LE-NEXT: lwarx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB62_4
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bne 0, .LBB62_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB62_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB62_4:
-; PPC64LE-NEXT: stwcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB62_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i32* %ptr, i32 %cmp, i32 %val acquire acquire
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB63_1:
; PPC64LE-NEXT: lwarx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB63_3
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bnelr 0
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 5, 0, 3
-; PPC64LE-NEXT: beqlr 0
-; PPC64LE-NEXT: b .LBB63_1
-; PPC64LE-NEXT: .LBB63_3:
-; PPC64LE-NEXT: stwcx. 6, 0, 3
+; PPC64LE-NEXT: bne 0, .LBB63_1
+; PPC64LE-NEXT: # %bb.3:
; PPC64LE-NEXT: blr
%res = cmpxchg i32* %ptr, i32 %cmp, i32 %val release monotonic
ret void
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB64_1:
; PPC64LE-NEXT: lwarx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB64_4
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bne 0, .LBB64_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB64_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB64_4:
-; PPC64LE-NEXT: stwcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB64_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i32* %ptr, i32 %cmp, i32 %val release acquire
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB65_1:
; PPC64LE-NEXT: lwarx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB65_4
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bne 0, .LBB65_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB65_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB65_4:
-; PPC64LE-NEXT: stwcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB65_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i32* %ptr, i32 %cmp, i32 %val acq_rel monotonic
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB66_1:
; PPC64LE-NEXT: lwarx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB66_4
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bne 0, .LBB66_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB66_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB66_4:
-; PPC64LE-NEXT: stwcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB66_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i32* %ptr, i32 %cmp, i32 %val acq_rel acquire
; PPC64LE-NEXT: sync
; PPC64LE-NEXT: .LBB67_1:
; PPC64LE-NEXT: lwarx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB67_4
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bne 0, .LBB67_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB67_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB67_4:
-; PPC64LE-NEXT: stwcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB67_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i32* %ptr, i32 %cmp, i32 %val seq_cst monotonic
; PPC64LE-NEXT: sync
; PPC64LE-NEXT: .LBB68_1:
; PPC64LE-NEXT: lwarx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB68_4
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bne 0, .LBB68_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB68_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB68_4:
-; PPC64LE-NEXT: stwcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB68_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i32* %ptr, i32 %cmp, i32 %val seq_cst acquire
; PPC64LE-NEXT: sync
; PPC64LE-NEXT: .LBB69_1:
; PPC64LE-NEXT: lwarx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB69_4
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bne 0, .LBB69_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB69_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB69_4:
-; PPC64LE-NEXT: stwcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB69_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i32* %ptr, i32 %cmp, i32 %val seq_cst seq_cst
; PPC64LE: # %bb.0:
; PPC64LE-NEXT: .LBB70_1:
; PPC64LE-NEXT: ldarx 6, 0, 3
-; PPC64LE-NEXT: cmpd 4, 6
-; PPC64LE-NEXT: bne 0, .LBB70_3
+; PPC64LE-NEXT: cmpd 6, 4
+; PPC64LE-NEXT: bnelr 0
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 5, 0, 3
-; PPC64LE-NEXT: beqlr 0
-; PPC64LE-NEXT: b .LBB70_1
-; PPC64LE-NEXT: .LBB70_3:
-; PPC64LE-NEXT: stdcx. 6, 0, 3
+; PPC64LE-NEXT: bne 0, .LBB70_1
+; PPC64LE-NEXT: # %bb.3:
; PPC64LE-NEXT: blr
%res = cmpxchg i64* %ptr, i64 %cmp, i64 %val monotonic monotonic
ret void
; PPC64LE: # %bb.0:
; PPC64LE-NEXT: .LBB71_1:
; PPC64LE-NEXT: ldarx 6, 0, 3
-; PPC64LE-NEXT: cmpd 4, 6
-; PPC64LE-NEXT: bne 0, .LBB71_4
+; PPC64LE-NEXT: cmpd 6, 4
+; PPC64LE-NEXT: bne 0, .LBB71_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB71_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB71_4:
-; PPC64LE-NEXT: stdcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB71_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i64* %ptr, i64 %cmp, i64 %val acquire monotonic
; PPC64LE: # %bb.0:
; PPC64LE-NEXT: .LBB72_1:
; PPC64LE-NEXT: ldarx 6, 0, 3
-; PPC64LE-NEXT: cmpd 4, 6
-; PPC64LE-NEXT: bne 0, .LBB72_4
+; PPC64LE-NEXT: cmpd 6, 4
+; PPC64LE-NEXT: bne 0, .LBB72_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB72_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB72_4:
-; PPC64LE-NEXT: stdcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB72_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i64* %ptr, i64 %cmp, i64 %val acquire acquire
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB73_1:
; PPC64LE-NEXT: ldarx 6, 0, 3
-; PPC64LE-NEXT: cmpd 4, 6
-; PPC64LE-NEXT: bne 0, .LBB73_3
+; PPC64LE-NEXT: cmpd 6, 4
+; PPC64LE-NEXT: bnelr 0
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 5, 0, 3
-; PPC64LE-NEXT: beqlr 0
-; PPC64LE-NEXT: b .LBB73_1
-; PPC64LE-NEXT: .LBB73_3:
-; PPC64LE-NEXT: stdcx. 6, 0, 3
+; PPC64LE-NEXT: bne 0, .LBB73_1
+; PPC64LE-NEXT: # %bb.3:
; PPC64LE-NEXT: blr
%res = cmpxchg i64* %ptr, i64 %cmp, i64 %val release monotonic
ret void
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB74_1:
; PPC64LE-NEXT: ldarx 6, 0, 3
-; PPC64LE-NEXT: cmpd 4, 6
-; PPC64LE-NEXT: bne 0, .LBB74_4
+; PPC64LE-NEXT: cmpd 6, 4
+; PPC64LE-NEXT: bne 0, .LBB74_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB74_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB74_4:
-; PPC64LE-NEXT: stdcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB74_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i64* %ptr, i64 %cmp, i64 %val release acquire
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB75_1:
; PPC64LE-NEXT: ldarx 6, 0, 3
-; PPC64LE-NEXT: cmpd 4, 6
-; PPC64LE-NEXT: bne 0, .LBB75_4
+; PPC64LE-NEXT: cmpd 6, 4
+; PPC64LE-NEXT: bne 0, .LBB75_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB75_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB75_4:
-; PPC64LE-NEXT: stdcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB75_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i64* %ptr, i64 %cmp, i64 %val acq_rel monotonic
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB76_1:
; PPC64LE-NEXT: ldarx 6, 0, 3
-; PPC64LE-NEXT: cmpd 4, 6
-; PPC64LE-NEXT: bne 0, .LBB76_4
+; PPC64LE-NEXT: cmpd 6, 4
+; PPC64LE-NEXT: bne 0, .LBB76_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB76_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB76_4:
-; PPC64LE-NEXT: stdcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB76_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i64* %ptr, i64 %cmp, i64 %val acq_rel acquire
; PPC64LE-NEXT: sync
; PPC64LE-NEXT: .LBB77_1:
; PPC64LE-NEXT: ldarx 6, 0, 3
-; PPC64LE-NEXT: cmpd 4, 6
-; PPC64LE-NEXT: bne 0, .LBB77_4
+; PPC64LE-NEXT: cmpd 6, 4
+; PPC64LE-NEXT: bne 0, .LBB77_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB77_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB77_4:
-; PPC64LE-NEXT: stdcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB77_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i64* %ptr, i64 %cmp, i64 %val seq_cst monotonic
; PPC64LE-NEXT: sync
; PPC64LE-NEXT: .LBB78_1:
; PPC64LE-NEXT: ldarx 6, 0, 3
-; PPC64LE-NEXT: cmpd 4, 6
-; PPC64LE-NEXT: bne 0, .LBB78_4
+; PPC64LE-NEXT: cmpd 6, 4
+; PPC64LE-NEXT: bne 0, .LBB78_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB78_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB78_4:
-; PPC64LE-NEXT: stdcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB78_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i64* %ptr, i64 %cmp, i64 %val seq_cst acquire
; PPC64LE-NEXT: sync
; PPC64LE-NEXT: .LBB79_1:
; PPC64LE-NEXT: ldarx 6, 0, 3
-; PPC64LE-NEXT: cmpd 4, 6
-; PPC64LE-NEXT: bne 0, .LBB79_4
+; PPC64LE-NEXT: cmpd 6, 4
+; PPC64LE-NEXT: bne 0, .LBB79_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB79_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB79_4:
-; PPC64LE-NEXT: stdcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB79_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i64* %ptr, i64 %cmp, i64 %val seq_cst seq_cst
; PPC64LE-NEXT: clrlwi 4, 4, 24
; PPC64LE-NEXT: .LBB80_1:
; PPC64LE-NEXT: lbarx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB80_3
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bnelr 0
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 5, 0, 3
-; PPC64LE-NEXT: beqlr 0
-; PPC64LE-NEXT: b .LBB80_1
-; PPC64LE-NEXT: .LBB80_3:
-; PPC64LE-NEXT: stbcx. 6, 0, 3
+; PPC64LE-NEXT: bne 0, .LBB80_1
+; PPC64LE-NEXT: # %bb.3:
; PPC64LE-NEXT: blr
%res = cmpxchg i8* %ptr, i8 %cmp, i8 %val syncscope("singlethread") monotonic monotonic
ret void
; PPC64LE-NEXT: clrlwi 4, 4, 24
; PPC64LE-NEXT: .LBB81_1:
; PPC64LE-NEXT: lbarx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB81_4
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bne 0, .LBB81_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB81_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB81_4:
-; PPC64LE-NEXT: stbcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB81_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i8* %ptr, i8 %cmp, i8 %val syncscope("singlethread") acquire monotonic
; PPC64LE-NEXT: clrlwi 4, 4, 24
; PPC64LE-NEXT: .LBB82_1:
; PPC64LE-NEXT: lbarx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB82_4
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bne 0, .LBB82_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB82_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB82_4:
-; PPC64LE-NEXT: stbcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB82_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i8* %ptr, i8 %cmp, i8 %val syncscope("singlethread") acquire acquire
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB83_1:
; PPC64LE-NEXT: lbarx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB83_3
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bnelr 0
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 5, 0, 3
-; PPC64LE-NEXT: beqlr 0
-; PPC64LE-NEXT: b .LBB83_1
-; PPC64LE-NEXT: .LBB83_3:
-; PPC64LE-NEXT: stbcx. 6, 0, 3
+; PPC64LE-NEXT: bne 0, .LBB83_1
+; PPC64LE-NEXT: # %bb.3:
; PPC64LE-NEXT: blr
%res = cmpxchg i8* %ptr, i8 %cmp, i8 %val syncscope("singlethread") release monotonic
ret void
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB84_1:
; PPC64LE-NEXT: lbarx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB84_4
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bne 0, .LBB84_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB84_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB84_4:
-; PPC64LE-NEXT: stbcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB84_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i8* %ptr, i8 %cmp, i8 %val syncscope("singlethread") release acquire
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB85_1:
; PPC64LE-NEXT: lbarx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB85_4
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bne 0, .LBB85_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB85_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB85_4:
-; PPC64LE-NEXT: stbcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB85_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i8* %ptr, i8 %cmp, i8 %val syncscope("singlethread") acq_rel monotonic
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB86_1:
; PPC64LE-NEXT: lbarx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB86_4
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bne 0, .LBB86_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB86_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB86_4:
-; PPC64LE-NEXT: stbcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB86_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i8* %ptr, i8 %cmp, i8 %val syncscope("singlethread") acq_rel acquire
; PPC64LE-NEXT: sync
; PPC64LE-NEXT: .LBB87_1:
; PPC64LE-NEXT: lbarx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB87_4
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bne 0, .LBB87_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB87_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB87_4:
-; PPC64LE-NEXT: stbcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB87_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i8* %ptr, i8 %cmp, i8 %val syncscope("singlethread") seq_cst monotonic
; PPC64LE-NEXT: sync
; PPC64LE-NEXT: .LBB88_1:
; PPC64LE-NEXT: lbarx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB88_4
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bne 0, .LBB88_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB88_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB88_4:
-; PPC64LE-NEXT: stbcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB88_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i8* %ptr, i8 %cmp, i8 %val syncscope("singlethread") seq_cst acquire
; PPC64LE-NEXT: sync
; PPC64LE-NEXT: .LBB89_1:
; PPC64LE-NEXT: lbarx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB89_4
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bne 0, .LBB89_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB89_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB89_4:
-; PPC64LE-NEXT: stbcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB89_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i8* %ptr, i8 %cmp, i8 %val syncscope("singlethread") seq_cst seq_cst
; PPC64LE-NEXT: clrlwi 4, 4, 16
; PPC64LE-NEXT: .LBB90_1:
; PPC64LE-NEXT: lharx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB90_3
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bnelr 0
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 5, 0, 3
-; PPC64LE-NEXT: beqlr 0
-; PPC64LE-NEXT: b .LBB90_1
-; PPC64LE-NEXT: .LBB90_3:
-; PPC64LE-NEXT: sthcx. 6, 0, 3
+; PPC64LE-NEXT: bne 0, .LBB90_1
+; PPC64LE-NEXT: # %bb.3:
; PPC64LE-NEXT: blr
%res = cmpxchg i16* %ptr, i16 %cmp, i16 %val syncscope("singlethread") monotonic monotonic
ret void
; PPC64LE-NEXT: clrlwi 4, 4, 16
; PPC64LE-NEXT: .LBB91_1:
; PPC64LE-NEXT: lharx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB91_4
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bne 0, .LBB91_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB91_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB91_4:
-; PPC64LE-NEXT: sthcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB91_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i16* %ptr, i16 %cmp, i16 %val syncscope("singlethread") acquire monotonic
; PPC64LE-NEXT: clrlwi 4, 4, 16
; PPC64LE-NEXT: .LBB92_1:
; PPC64LE-NEXT: lharx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB92_4
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bne 0, .LBB92_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB92_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB92_4:
-; PPC64LE-NEXT: sthcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB92_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i16* %ptr, i16 %cmp, i16 %val syncscope("singlethread") acquire acquire
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB93_1:
; PPC64LE-NEXT: lharx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB93_3
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bnelr 0
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 5, 0, 3
-; PPC64LE-NEXT: beqlr 0
-; PPC64LE-NEXT: b .LBB93_1
-; PPC64LE-NEXT: .LBB93_3:
-; PPC64LE-NEXT: sthcx. 6, 0, 3
+; PPC64LE-NEXT: bne 0, .LBB93_1
+; PPC64LE-NEXT: # %bb.3:
; PPC64LE-NEXT: blr
%res = cmpxchg i16* %ptr, i16 %cmp, i16 %val syncscope("singlethread") release monotonic
ret void
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB94_1:
; PPC64LE-NEXT: lharx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB94_4
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bne 0, .LBB94_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB94_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB94_4:
-; PPC64LE-NEXT: sthcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB94_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i16* %ptr, i16 %cmp, i16 %val syncscope("singlethread") release acquire
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB95_1:
; PPC64LE-NEXT: lharx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB95_4
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bne 0, .LBB95_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB95_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB95_4:
-; PPC64LE-NEXT: sthcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB95_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i16* %ptr, i16 %cmp, i16 %val syncscope("singlethread") acq_rel monotonic
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB96_1:
; PPC64LE-NEXT: lharx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB96_4
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bne 0, .LBB96_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB96_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB96_4:
-; PPC64LE-NEXT: sthcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB96_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i16* %ptr, i16 %cmp, i16 %val syncscope("singlethread") acq_rel acquire
; PPC64LE-NEXT: sync
; PPC64LE-NEXT: .LBB97_1:
; PPC64LE-NEXT: lharx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB97_4
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bne 0, .LBB97_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB97_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB97_4:
-; PPC64LE-NEXT: sthcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB97_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i16* %ptr, i16 %cmp, i16 %val syncscope("singlethread") seq_cst monotonic
; PPC64LE-NEXT: sync
; PPC64LE-NEXT: .LBB98_1:
; PPC64LE-NEXT: lharx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB98_4
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bne 0, .LBB98_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB98_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB98_4:
-; PPC64LE-NEXT: sthcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB98_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i16* %ptr, i16 %cmp, i16 %val syncscope("singlethread") seq_cst acquire
; PPC64LE-NEXT: sync
; PPC64LE-NEXT: .LBB99_1:
; PPC64LE-NEXT: lharx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB99_4
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bne 0, .LBB99_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB99_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB99_4:
-; PPC64LE-NEXT: sthcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB99_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i16* %ptr, i16 %cmp, i16 %val syncscope("singlethread") seq_cst seq_cst
; PPC64LE: # %bb.0:
; PPC64LE-NEXT: .LBB100_1:
; PPC64LE-NEXT: lwarx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB100_3
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bnelr 0
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 5, 0, 3
-; PPC64LE-NEXT: beqlr 0
-; PPC64LE-NEXT: b .LBB100_1
-; PPC64LE-NEXT: .LBB100_3:
-; PPC64LE-NEXT: stwcx. 6, 0, 3
+; PPC64LE-NEXT: bne 0, .LBB100_1
+; PPC64LE-NEXT: # %bb.3:
; PPC64LE-NEXT: blr
%res = cmpxchg i32* %ptr, i32 %cmp, i32 %val syncscope("singlethread") monotonic monotonic
ret void
; PPC64LE: # %bb.0:
; PPC64LE-NEXT: .LBB101_1:
; PPC64LE-NEXT: lwarx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB101_4
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bne 0, .LBB101_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB101_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB101_4:
-; PPC64LE-NEXT: stwcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB101_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i32* %ptr, i32 %cmp, i32 %val syncscope("singlethread") acquire monotonic
; PPC64LE: # %bb.0:
; PPC64LE-NEXT: .LBB102_1:
; PPC64LE-NEXT: lwarx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB102_4
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bne 0, .LBB102_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB102_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB102_4:
-; PPC64LE-NEXT: stwcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB102_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i32* %ptr, i32 %cmp, i32 %val syncscope("singlethread") acquire acquire
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB103_1:
; PPC64LE-NEXT: lwarx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB103_3
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bnelr 0
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 5, 0, 3
-; PPC64LE-NEXT: beqlr 0
-; PPC64LE-NEXT: b .LBB103_1
-; PPC64LE-NEXT: .LBB103_3:
-; PPC64LE-NEXT: stwcx. 6, 0, 3
+; PPC64LE-NEXT: bne 0, .LBB103_1
+; PPC64LE-NEXT: # %bb.3:
; PPC64LE-NEXT: blr
%res = cmpxchg i32* %ptr, i32 %cmp, i32 %val syncscope("singlethread") release monotonic
ret void
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB104_1:
; PPC64LE-NEXT: lwarx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB104_4
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bne 0, .LBB104_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB104_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB104_4:
-; PPC64LE-NEXT: stwcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB104_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i32* %ptr, i32 %cmp, i32 %val syncscope("singlethread") release acquire
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB105_1:
; PPC64LE-NEXT: lwarx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB105_4
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bne 0, .LBB105_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB105_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB105_4:
-; PPC64LE-NEXT: stwcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB105_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i32* %ptr, i32 %cmp, i32 %val syncscope("singlethread") acq_rel monotonic
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB106_1:
; PPC64LE-NEXT: lwarx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB106_4
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bne 0, .LBB106_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB106_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB106_4:
-; PPC64LE-NEXT: stwcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB106_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i32* %ptr, i32 %cmp, i32 %val syncscope("singlethread") acq_rel acquire
; PPC64LE-NEXT: sync
; PPC64LE-NEXT: .LBB107_1:
; PPC64LE-NEXT: lwarx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB107_4
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bne 0, .LBB107_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB107_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB107_4:
-; PPC64LE-NEXT: stwcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB107_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i32* %ptr, i32 %cmp, i32 %val syncscope("singlethread") seq_cst monotonic
; PPC64LE-NEXT: sync
; PPC64LE-NEXT: .LBB108_1:
; PPC64LE-NEXT: lwarx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB108_4
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bne 0, .LBB108_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB108_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB108_4:
-; PPC64LE-NEXT: stwcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB108_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i32* %ptr, i32 %cmp, i32 %val syncscope("singlethread") seq_cst acquire
; PPC64LE-NEXT: sync
; PPC64LE-NEXT: .LBB109_1:
; PPC64LE-NEXT: lwarx 6, 0, 3
-; PPC64LE-NEXT: cmpw 4, 6
-; PPC64LE-NEXT: bne 0, .LBB109_4
+; PPC64LE-NEXT: cmpw 6, 4
+; PPC64LE-NEXT: bne 0, .LBB109_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB109_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB109_4:
-; PPC64LE-NEXT: stwcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB109_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i32* %ptr, i32 %cmp, i32 %val syncscope("singlethread") seq_cst seq_cst
; PPC64LE: # %bb.0:
; PPC64LE-NEXT: .LBB110_1:
; PPC64LE-NEXT: ldarx 6, 0, 3
-; PPC64LE-NEXT: cmpd 4, 6
-; PPC64LE-NEXT: bne 0, .LBB110_3
+; PPC64LE-NEXT: cmpd 6, 4
+; PPC64LE-NEXT: bnelr 0
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 5, 0, 3
-; PPC64LE-NEXT: beqlr 0
-; PPC64LE-NEXT: b .LBB110_1
-; PPC64LE-NEXT: .LBB110_3:
-; PPC64LE-NEXT: stdcx. 6, 0, 3
+; PPC64LE-NEXT: bne 0, .LBB110_1
+; PPC64LE-NEXT: # %bb.3:
; PPC64LE-NEXT: blr
%res = cmpxchg i64* %ptr, i64 %cmp, i64 %val syncscope("singlethread") monotonic monotonic
ret void
; PPC64LE: # %bb.0:
; PPC64LE-NEXT: .LBB111_1:
; PPC64LE-NEXT: ldarx 6, 0, 3
-; PPC64LE-NEXT: cmpd 4, 6
-; PPC64LE-NEXT: bne 0, .LBB111_4
+; PPC64LE-NEXT: cmpd 6, 4
+; PPC64LE-NEXT: bne 0, .LBB111_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB111_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB111_4:
-; PPC64LE-NEXT: stdcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB111_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i64* %ptr, i64 %cmp, i64 %val syncscope("singlethread") acquire monotonic
; PPC64LE: # %bb.0:
; PPC64LE-NEXT: .LBB112_1:
; PPC64LE-NEXT: ldarx 6, 0, 3
-; PPC64LE-NEXT: cmpd 4, 6
-; PPC64LE-NEXT: bne 0, .LBB112_4
+; PPC64LE-NEXT: cmpd 6, 4
+; PPC64LE-NEXT: bne 0, .LBB112_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB112_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB112_4:
-; PPC64LE-NEXT: stdcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB112_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i64* %ptr, i64 %cmp, i64 %val syncscope("singlethread") acquire acquire
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB113_1:
; PPC64LE-NEXT: ldarx 6, 0, 3
-; PPC64LE-NEXT: cmpd 4, 6
-; PPC64LE-NEXT: bne 0, .LBB113_3
+; PPC64LE-NEXT: cmpd 6, 4
+; PPC64LE-NEXT: bnelr 0
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 5, 0, 3
-; PPC64LE-NEXT: beqlr 0
-; PPC64LE-NEXT: b .LBB113_1
-; PPC64LE-NEXT: .LBB113_3:
-; PPC64LE-NEXT: stdcx. 6, 0, 3
+; PPC64LE-NEXT: bne 0, .LBB113_1
+; PPC64LE-NEXT: # %bb.3:
; PPC64LE-NEXT: blr
%res = cmpxchg i64* %ptr, i64 %cmp, i64 %val syncscope("singlethread") release monotonic
ret void
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB114_1:
; PPC64LE-NEXT: ldarx 6, 0, 3
-; PPC64LE-NEXT: cmpd 4, 6
-; PPC64LE-NEXT: bne 0, .LBB114_4
+; PPC64LE-NEXT: cmpd 6, 4
+; PPC64LE-NEXT: bne 0, .LBB114_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB114_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB114_4:
-; PPC64LE-NEXT: stdcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB114_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i64* %ptr, i64 %cmp, i64 %val syncscope("singlethread") release acquire
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB115_1:
; PPC64LE-NEXT: ldarx 6, 0, 3
-; PPC64LE-NEXT: cmpd 4, 6
-; PPC64LE-NEXT: bne 0, .LBB115_4
+; PPC64LE-NEXT: cmpd 6, 4
+; PPC64LE-NEXT: bne 0, .LBB115_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB115_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB115_4:
-; PPC64LE-NEXT: stdcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB115_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i64* %ptr, i64 %cmp, i64 %val syncscope("singlethread") acq_rel monotonic
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB116_1:
; PPC64LE-NEXT: ldarx 6, 0, 3
-; PPC64LE-NEXT: cmpd 4, 6
-; PPC64LE-NEXT: bne 0, .LBB116_4
+; PPC64LE-NEXT: cmpd 6, 4
+; PPC64LE-NEXT: bne 0, .LBB116_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB116_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB116_4:
-; PPC64LE-NEXT: stdcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB116_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i64* %ptr, i64 %cmp, i64 %val syncscope("singlethread") acq_rel acquire
; PPC64LE-NEXT: sync
; PPC64LE-NEXT: .LBB117_1:
; PPC64LE-NEXT: ldarx 6, 0, 3
-; PPC64LE-NEXT: cmpd 4, 6
-; PPC64LE-NEXT: bne 0, .LBB117_4
+; PPC64LE-NEXT: cmpd 6, 4
+; PPC64LE-NEXT: bne 0, .LBB117_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB117_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB117_4:
-; PPC64LE-NEXT: stdcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB117_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i64* %ptr, i64 %cmp, i64 %val syncscope("singlethread") seq_cst monotonic
; PPC64LE-NEXT: sync
; PPC64LE-NEXT: .LBB118_1:
; PPC64LE-NEXT: ldarx 6, 0, 3
-; PPC64LE-NEXT: cmpd 4, 6
-; PPC64LE-NEXT: bne 0, .LBB118_4
+; PPC64LE-NEXT: cmpd 6, 4
+; PPC64LE-NEXT: bne 0, .LBB118_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB118_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB118_4:
-; PPC64LE-NEXT: stdcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB118_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i64* %ptr, i64 %cmp, i64 %val syncscope("singlethread") seq_cst acquire
; PPC64LE-NEXT: sync
; PPC64LE-NEXT: .LBB119_1:
; PPC64LE-NEXT: ldarx 6, 0, 3
-; PPC64LE-NEXT: cmpd 4, 6
-; PPC64LE-NEXT: bne 0, .LBB119_4
+; PPC64LE-NEXT: cmpd 6, 4
+; PPC64LE-NEXT: bne 0, .LBB119_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB119_1
-; PPC64LE-NEXT: # %bb.3:
-; PPC64LE-NEXT: lwsync
-; PPC64LE-NEXT: blr
-; PPC64LE-NEXT: .LBB119_4:
-; PPC64LE-NEXT: stdcx. 6, 0, 3
+; PPC64LE-NEXT: .LBB119_3:
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: blr
%res = cmpxchg i64* %ptr, i64 %cmp, i64 %val syncscope("singlethread") seq_cst seq_cst
; PPC64LE-NEXT: .LBB260_1:
; PPC64LE-NEXT: lbarx 4, 0, 3
; PPC64LE-NEXT: extsb 6, 4
-; PPC64LE-NEXT: cmpw 5, 6
-; PPC64LE-NEXT: ble 0, .LBB260_3
+; PPC64LE-NEXT: cmpw 6, 5
+; PPC64LE-NEXT: bgt 0, .LBB260_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB260_1
; PPC64LE-NEXT: .LBB261_1:
; PPC64LE-NEXT: lbarx 4, 0, 3
; PPC64LE-NEXT: extsb 6, 4
-; PPC64LE-NEXT: cmpw 5, 6
-; PPC64LE-NEXT: ble 0, .LBB261_3
+; PPC64LE-NEXT: cmpw 6, 5
+; PPC64LE-NEXT: bgt 0, .LBB261_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB261_1
; PPC64LE-NEXT: .LBB262_1:
; PPC64LE-NEXT: lbarx 4, 0, 3
; PPC64LE-NEXT: extsb 6, 4
-; PPC64LE-NEXT: cmpw 5, 6
-; PPC64LE-NEXT: ble 0, .LBB262_3
+; PPC64LE-NEXT: cmpw 6, 5
+; PPC64LE-NEXT: bgt 0, .LBB262_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB262_1
; PPC64LE-NEXT: .LBB263_1:
; PPC64LE-NEXT: lbarx 4, 0, 3
; PPC64LE-NEXT: extsb 6, 4
-; PPC64LE-NEXT: cmpw 5, 6
-; PPC64LE-NEXT: ble 0, .LBB263_3
+; PPC64LE-NEXT: cmpw 6, 5
+; PPC64LE-NEXT: bgt 0, .LBB263_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB263_1
; PPC64LE-NEXT: .LBB264_1:
; PPC64LE-NEXT: lbarx 4, 0, 3
; PPC64LE-NEXT: extsb 6, 4
-; PPC64LE-NEXT: cmpw 5, 6
-; PPC64LE-NEXT: ble 0, .LBB264_3
+; PPC64LE-NEXT: cmpw 6, 5
+; PPC64LE-NEXT: bgt 0, .LBB264_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB264_1
; PPC64LE-NEXT: .LBB265_1:
; PPC64LE-NEXT: lharx 4, 0, 3
; PPC64LE-NEXT: extsh 6, 4
-; PPC64LE-NEXT: cmpw 5, 6
-; PPC64LE-NEXT: ble 0, .LBB265_3
+; PPC64LE-NEXT: cmpw 6, 5
+; PPC64LE-NEXT: bgt 0, .LBB265_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB265_1
; PPC64LE-NEXT: .LBB266_1:
; PPC64LE-NEXT: lharx 4, 0, 3
; PPC64LE-NEXT: extsh 6, 4
-; PPC64LE-NEXT: cmpw 5, 6
-; PPC64LE-NEXT: ble 0, .LBB266_3
+; PPC64LE-NEXT: cmpw 6, 5
+; PPC64LE-NEXT: bgt 0, .LBB266_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB266_1
; PPC64LE-NEXT: .LBB267_1:
; PPC64LE-NEXT: lharx 4, 0, 3
; PPC64LE-NEXT: extsh 6, 4
-; PPC64LE-NEXT: cmpw 5, 6
-; PPC64LE-NEXT: ble 0, .LBB267_3
+; PPC64LE-NEXT: cmpw 6, 5
+; PPC64LE-NEXT: bgt 0, .LBB267_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB267_1
; PPC64LE-NEXT: .LBB268_1:
; PPC64LE-NEXT: lharx 4, 0, 3
; PPC64LE-NEXT: extsh 6, 4
-; PPC64LE-NEXT: cmpw 5, 6
-; PPC64LE-NEXT: ble 0, .LBB268_3
+; PPC64LE-NEXT: cmpw 6, 5
+; PPC64LE-NEXT: bgt 0, .LBB268_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB268_1
; PPC64LE-NEXT: .LBB269_1:
; PPC64LE-NEXT: lharx 4, 0, 3
; PPC64LE-NEXT: extsh 6, 4
-; PPC64LE-NEXT: cmpw 5, 6
-; PPC64LE-NEXT: ble 0, .LBB269_3
+; PPC64LE-NEXT: cmpw 6, 5
+; PPC64LE-NEXT: bgt 0, .LBB269_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB269_1
; PPC64LE: # %bb.0:
; PPC64LE-NEXT: .LBB270_1:
; PPC64LE-NEXT: lwarx 5, 0, 3
-; PPC64LE-NEXT: cmpw 4, 5
-; PPC64LE-NEXT: ble 0, .LBB270_3
+; PPC64LE-NEXT: cmpw 5, 4
+; PPC64LE-NEXT: bgt 0, .LBB270_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB270_1
; PPC64LE-NEXT: mr 5, 3
; PPC64LE-NEXT: .LBB271_1:
; PPC64LE-NEXT: lwarx 3, 0, 5
-; PPC64LE-NEXT: cmpw 4, 3
-; PPC64LE-NEXT: ble 0, .LBB271_3
+; PPC64LE-NEXT: cmpw 3, 4
+; PPC64LE-NEXT: bgt 0, .LBB271_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 4, 0, 5
; PPC64LE-NEXT: bne 0, .LBB271_1
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB272_1:
; PPC64LE-NEXT: lwarx 5, 0, 3
-; PPC64LE-NEXT: cmpw 4, 5
-; PPC64LE-NEXT: ble 0, .LBB272_3
+; PPC64LE-NEXT: cmpw 5, 4
+; PPC64LE-NEXT: bgt 0, .LBB272_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB272_1
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB273_1:
; PPC64LE-NEXT: lwarx 5, 0, 3
-; PPC64LE-NEXT: cmpw 4, 5
-; PPC64LE-NEXT: ble 0, .LBB273_3
+; PPC64LE-NEXT: cmpw 5, 4
+; PPC64LE-NEXT: bgt 0, .LBB273_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB273_1
; PPC64LE-NEXT: sync
; PPC64LE-NEXT: .LBB274_1:
; PPC64LE-NEXT: lwarx 5, 0, 3
-; PPC64LE-NEXT: cmpw 4, 5
-; PPC64LE-NEXT: ble 0, .LBB274_3
+; PPC64LE-NEXT: cmpw 5, 4
+; PPC64LE-NEXT: bgt 0, .LBB274_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB274_1
; PPC64LE: # %bb.0:
; PPC64LE-NEXT: .LBB275_1:
; PPC64LE-NEXT: ldarx 5, 0, 3
-; PPC64LE-NEXT: cmpd 4, 5
-; PPC64LE-NEXT: ble 0, .LBB275_3
+; PPC64LE-NEXT: cmpd 5, 4
+; PPC64LE-NEXT: bgt 0, .LBB275_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB275_1
; PPC64LE-NEXT: mr 5, 3
; PPC64LE-NEXT: .LBB276_1:
; PPC64LE-NEXT: ldarx 3, 0, 5
-; PPC64LE-NEXT: cmpd 4, 3
-; PPC64LE-NEXT: ble 0, .LBB276_3
+; PPC64LE-NEXT: cmpd 3, 4
+; PPC64LE-NEXT: bgt 0, .LBB276_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 4, 0, 5
; PPC64LE-NEXT: bne 0, .LBB276_1
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB277_1:
; PPC64LE-NEXT: ldarx 5, 0, 3
-; PPC64LE-NEXT: cmpd 4, 5
-; PPC64LE-NEXT: ble 0, .LBB277_3
+; PPC64LE-NEXT: cmpd 5, 4
+; PPC64LE-NEXT: bgt 0, .LBB277_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB277_1
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB278_1:
; PPC64LE-NEXT: ldarx 5, 0, 3
-; PPC64LE-NEXT: cmpd 4, 5
-; PPC64LE-NEXT: ble 0, .LBB278_3
+; PPC64LE-NEXT: cmpd 5, 4
+; PPC64LE-NEXT: bgt 0, .LBB278_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB278_1
; PPC64LE-NEXT: sync
; PPC64LE-NEXT: .LBB279_1:
; PPC64LE-NEXT: ldarx 5, 0, 3
-; PPC64LE-NEXT: cmpd 4, 5
-; PPC64LE-NEXT: ble 0, .LBB279_3
+; PPC64LE-NEXT: cmpd 5, 4
+; PPC64LE-NEXT: bgt 0, .LBB279_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB279_1
; PPC64LE-NEXT: .LBB280_1:
; PPC64LE-NEXT: lbarx 4, 0, 3
; PPC64LE-NEXT: extsb 6, 4
-; PPC64LE-NEXT: cmpw 5, 6
-; PPC64LE-NEXT: bge 0, .LBB280_3
+; PPC64LE-NEXT: cmpw 6, 5
+; PPC64LE-NEXT: blt 0, .LBB280_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB280_1
; PPC64LE-NEXT: .LBB281_1:
; PPC64LE-NEXT: lbarx 4, 0, 3
; PPC64LE-NEXT: extsb 6, 4
-; PPC64LE-NEXT: cmpw 5, 6
-; PPC64LE-NEXT: bge 0, .LBB281_3
+; PPC64LE-NEXT: cmpw 6, 5
+; PPC64LE-NEXT: blt 0, .LBB281_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB281_1
; PPC64LE-NEXT: .LBB282_1:
; PPC64LE-NEXT: lbarx 4, 0, 3
; PPC64LE-NEXT: extsb 6, 4
-; PPC64LE-NEXT: cmpw 5, 6
-; PPC64LE-NEXT: bge 0, .LBB282_3
+; PPC64LE-NEXT: cmpw 6, 5
+; PPC64LE-NEXT: blt 0, .LBB282_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB282_1
; PPC64LE-NEXT: .LBB283_1:
; PPC64LE-NEXT: lbarx 4, 0, 3
; PPC64LE-NEXT: extsb 6, 4
-; PPC64LE-NEXT: cmpw 5, 6
-; PPC64LE-NEXT: bge 0, .LBB283_3
+; PPC64LE-NEXT: cmpw 6, 5
+; PPC64LE-NEXT: blt 0, .LBB283_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB283_1
; PPC64LE-NEXT: .LBB284_1:
; PPC64LE-NEXT: lbarx 4, 0, 3
; PPC64LE-NEXT: extsb 6, 4
-; PPC64LE-NEXT: cmpw 5, 6
-; PPC64LE-NEXT: bge 0, .LBB284_3
+; PPC64LE-NEXT: cmpw 6, 5
+; PPC64LE-NEXT: blt 0, .LBB284_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB284_1
; PPC64LE-NEXT: .LBB285_1:
; PPC64LE-NEXT: lharx 4, 0, 3
; PPC64LE-NEXT: extsh 6, 4
-; PPC64LE-NEXT: cmpw 5, 6
-; PPC64LE-NEXT: bge 0, .LBB285_3
+; PPC64LE-NEXT: cmpw 6, 5
+; PPC64LE-NEXT: blt 0, .LBB285_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB285_1
; PPC64LE-NEXT: .LBB286_1:
; PPC64LE-NEXT: lharx 4, 0, 3
; PPC64LE-NEXT: extsh 6, 4
-; PPC64LE-NEXT: cmpw 5, 6
-; PPC64LE-NEXT: bge 0, .LBB286_3
+; PPC64LE-NEXT: cmpw 6, 5
+; PPC64LE-NEXT: blt 0, .LBB286_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB286_1
; PPC64LE-NEXT: .LBB287_1:
; PPC64LE-NEXT: lharx 4, 0, 3
; PPC64LE-NEXT: extsh 6, 4
-; PPC64LE-NEXT: cmpw 5, 6
-; PPC64LE-NEXT: bge 0, .LBB287_3
+; PPC64LE-NEXT: cmpw 6, 5
+; PPC64LE-NEXT: blt 0, .LBB287_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB287_1
; PPC64LE-NEXT: .LBB288_1:
; PPC64LE-NEXT: lharx 4, 0, 3
; PPC64LE-NEXT: extsh 6, 4
-; PPC64LE-NEXT: cmpw 5, 6
-; PPC64LE-NEXT: bge 0, .LBB288_3
+; PPC64LE-NEXT: cmpw 6, 5
+; PPC64LE-NEXT: blt 0, .LBB288_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB288_1
; PPC64LE-NEXT: .LBB289_1:
; PPC64LE-NEXT: lharx 4, 0, 3
; PPC64LE-NEXT: extsh 6, 4
-; PPC64LE-NEXT: cmpw 5, 6
-; PPC64LE-NEXT: bge 0, .LBB289_3
+; PPC64LE-NEXT: cmpw 6, 5
+; PPC64LE-NEXT: blt 0, .LBB289_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB289_1
; PPC64LE: # %bb.0:
; PPC64LE-NEXT: .LBB290_1:
; PPC64LE-NEXT: lwarx 5, 0, 3
-; PPC64LE-NEXT: cmpw 4, 5
-; PPC64LE-NEXT: bge 0, .LBB290_3
+; PPC64LE-NEXT: cmpw 5, 4
+; PPC64LE-NEXT: blt 0, .LBB290_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB290_1
; PPC64LE-NEXT: mr 5, 3
; PPC64LE-NEXT: .LBB291_1:
; PPC64LE-NEXT: lwarx 3, 0, 5
-; PPC64LE-NEXT: cmpw 4, 3
-; PPC64LE-NEXT: bge 0, .LBB291_3
+; PPC64LE-NEXT: cmpw 3, 4
+; PPC64LE-NEXT: blt 0, .LBB291_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 4, 0, 5
; PPC64LE-NEXT: bne 0, .LBB291_1
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB292_1:
; PPC64LE-NEXT: lwarx 5, 0, 3
-; PPC64LE-NEXT: cmpw 4, 5
-; PPC64LE-NEXT: bge 0, .LBB292_3
+; PPC64LE-NEXT: cmpw 5, 4
+; PPC64LE-NEXT: blt 0, .LBB292_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB292_1
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB293_1:
; PPC64LE-NEXT: lwarx 5, 0, 3
-; PPC64LE-NEXT: cmpw 4, 5
-; PPC64LE-NEXT: bge 0, .LBB293_3
+; PPC64LE-NEXT: cmpw 5, 4
+; PPC64LE-NEXT: blt 0, .LBB293_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB293_1
; PPC64LE-NEXT: sync
; PPC64LE-NEXT: .LBB294_1:
; PPC64LE-NEXT: lwarx 5, 0, 3
-; PPC64LE-NEXT: cmpw 4, 5
-; PPC64LE-NEXT: bge 0, .LBB294_3
+; PPC64LE-NEXT: cmpw 5, 4
+; PPC64LE-NEXT: blt 0, .LBB294_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB294_1
; PPC64LE: # %bb.0:
; PPC64LE-NEXT: .LBB295_1:
; PPC64LE-NEXT: ldarx 5, 0, 3
-; PPC64LE-NEXT: cmpd 4, 5
-; PPC64LE-NEXT: bge 0, .LBB295_3
+; PPC64LE-NEXT: cmpd 5, 4
+; PPC64LE-NEXT: blt 0, .LBB295_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB295_1
; PPC64LE-NEXT: mr 5, 3
; PPC64LE-NEXT: .LBB296_1:
; PPC64LE-NEXT: ldarx 3, 0, 5
-; PPC64LE-NEXT: cmpd 4, 3
-; PPC64LE-NEXT: bge 0, .LBB296_3
+; PPC64LE-NEXT: cmpd 3, 4
+; PPC64LE-NEXT: blt 0, .LBB296_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 4, 0, 5
; PPC64LE-NEXT: bne 0, .LBB296_1
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB297_1:
; PPC64LE-NEXT: ldarx 5, 0, 3
-; PPC64LE-NEXT: cmpd 4, 5
-; PPC64LE-NEXT: bge 0, .LBB297_3
+; PPC64LE-NEXT: cmpd 5, 4
+; PPC64LE-NEXT: blt 0, .LBB297_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB297_1
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB298_1:
; PPC64LE-NEXT: ldarx 5, 0, 3
-; PPC64LE-NEXT: cmpd 4, 5
-; PPC64LE-NEXT: bge 0, .LBB298_3
+; PPC64LE-NEXT: cmpd 5, 4
+; PPC64LE-NEXT: blt 0, .LBB298_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB298_1
; PPC64LE-NEXT: sync
; PPC64LE-NEXT: .LBB299_1:
; PPC64LE-NEXT: ldarx 5, 0, 3
-; PPC64LE-NEXT: cmpd 4, 5
-; PPC64LE-NEXT: bge 0, .LBB299_3
+; PPC64LE-NEXT: cmpd 5, 4
+; PPC64LE-NEXT: blt 0, .LBB299_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB299_1
; PPC64LE: # %bb.0:
; PPC64LE-NEXT: .LBB300_1:
; PPC64LE-NEXT: lbarx 5, 0, 3
-; PPC64LE-NEXT: cmplw 4, 5
-; PPC64LE-NEXT: ble 0, .LBB300_3
+; PPC64LE-NEXT: cmplw 5, 4
+; PPC64LE-NEXT: bgt 0, .LBB300_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB300_1
; PPC64LE-NEXT: mr 5, 3
; PPC64LE-NEXT: .LBB301_1:
; PPC64LE-NEXT: lbarx 3, 0, 5
-; PPC64LE-NEXT: cmplw 4, 3
-; PPC64LE-NEXT: ble 0, .LBB301_3
+; PPC64LE-NEXT: cmplw 3, 4
+; PPC64LE-NEXT: bgt 0, .LBB301_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 4, 0, 5
; PPC64LE-NEXT: bne 0, .LBB301_1
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB302_1:
; PPC64LE-NEXT: lbarx 5, 0, 3
-; PPC64LE-NEXT: cmplw 4, 5
-; PPC64LE-NEXT: ble 0, .LBB302_3
+; PPC64LE-NEXT: cmplw 5, 4
+; PPC64LE-NEXT: bgt 0, .LBB302_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB302_1
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB303_1:
; PPC64LE-NEXT: lbarx 5, 0, 3
-; PPC64LE-NEXT: cmplw 4, 5
-; PPC64LE-NEXT: ble 0, .LBB303_3
+; PPC64LE-NEXT: cmplw 5, 4
+; PPC64LE-NEXT: bgt 0, .LBB303_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB303_1
; PPC64LE-NEXT: sync
; PPC64LE-NEXT: .LBB304_1:
; PPC64LE-NEXT: lbarx 5, 0, 3
-; PPC64LE-NEXT: cmplw 4, 5
-; PPC64LE-NEXT: ble 0, .LBB304_3
+; PPC64LE-NEXT: cmplw 5, 4
+; PPC64LE-NEXT: bgt 0, .LBB304_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB304_1
; PPC64LE: # %bb.0:
; PPC64LE-NEXT: .LBB305_1:
; PPC64LE-NEXT: lharx 5, 0, 3
-; PPC64LE-NEXT: cmplw 4, 5
-; PPC64LE-NEXT: ble 0, .LBB305_3
+; PPC64LE-NEXT: cmplw 5, 4
+; PPC64LE-NEXT: bgt 0, .LBB305_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB305_1
; PPC64LE-NEXT: mr 5, 3
; PPC64LE-NEXT: .LBB306_1:
; PPC64LE-NEXT: lharx 3, 0, 5
-; PPC64LE-NEXT: cmplw 4, 3
-; PPC64LE-NEXT: ble 0, .LBB306_3
+; PPC64LE-NEXT: cmplw 3, 4
+; PPC64LE-NEXT: bgt 0, .LBB306_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 4, 0, 5
; PPC64LE-NEXT: bne 0, .LBB306_1
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB307_1:
; PPC64LE-NEXT: lharx 5, 0, 3
-; PPC64LE-NEXT: cmplw 4, 5
-; PPC64LE-NEXT: ble 0, .LBB307_3
+; PPC64LE-NEXT: cmplw 5, 4
+; PPC64LE-NEXT: bgt 0, .LBB307_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB307_1
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB308_1:
; PPC64LE-NEXT: lharx 5, 0, 3
-; PPC64LE-NEXT: cmplw 4, 5
-; PPC64LE-NEXT: ble 0, .LBB308_3
+; PPC64LE-NEXT: cmplw 5, 4
+; PPC64LE-NEXT: bgt 0, .LBB308_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB308_1
; PPC64LE-NEXT: sync
; PPC64LE-NEXT: .LBB309_1:
; PPC64LE-NEXT: lharx 5, 0, 3
-; PPC64LE-NEXT: cmplw 4, 5
-; PPC64LE-NEXT: ble 0, .LBB309_3
+; PPC64LE-NEXT: cmplw 5, 4
+; PPC64LE-NEXT: bgt 0, .LBB309_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB309_1
; PPC64LE: # %bb.0:
; PPC64LE-NEXT: .LBB310_1:
; PPC64LE-NEXT: lwarx 5, 0, 3
-; PPC64LE-NEXT: cmplw 4, 5
-; PPC64LE-NEXT: ble 0, .LBB310_3
+; PPC64LE-NEXT: cmplw 5, 4
+; PPC64LE-NEXT: bgt 0, .LBB310_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB310_1
; PPC64LE-NEXT: mr 5, 3
; PPC64LE-NEXT: .LBB311_1:
; PPC64LE-NEXT: lwarx 3, 0, 5
-; PPC64LE-NEXT: cmplw 4, 3
-; PPC64LE-NEXT: ble 0, .LBB311_3
+; PPC64LE-NEXT: cmplw 3, 4
+; PPC64LE-NEXT: bgt 0, .LBB311_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 4, 0, 5
; PPC64LE-NEXT: bne 0, .LBB311_1
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB312_1:
; PPC64LE-NEXT: lwarx 5, 0, 3
-; PPC64LE-NEXT: cmplw 4, 5
-; PPC64LE-NEXT: ble 0, .LBB312_3
+; PPC64LE-NEXT: cmplw 5, 4
+; PPC64LE-NEXT: bgt 0, .LBB312_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB312_1
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB313_1:
; PPC64LE-NEXT: lwarx 5, 0, 3
-; PPC64LE-NEXT: cmplw 4, 5
-; PPC64LE-NEXT: ble 0, .LBB313_3
+; PPC64LE-NEXT: cmplw 5, 4
+; PPC64LE-NEXT: bgt 0, .LBB313_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB313_1
; PPC64LE-NEXT: sync
; PPC64LE-NEXT: .LBB314_1:
; PPC64LE-NEXT: lwarx 5, 0, 3
-; PPC64LE-NEXT: cmplw 4, 5
-; PPC64LE-NEXT: ble 0, .LBB314_3
+; PPC64LE-NEXT: cmplw 5, 4
+; PPC64LE-NEXT: bgt 0, .LBB314_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB314_1
; PPC64LE: # %bb.0:
; PPC64LE-NEXT: .LBB315_1:
; PPC64LE-NEXT: ldarx 5, 0, 3
-; PPC64LE-NEXT: cmpld 4, 5
-; PPC64LE-NEXT: ble 0, .LBB315_3
+; PPC64LE-NEXT: cmpld 5, 4
+; PPC64LE-NEXT: bgt 0, .LBB315_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB315_1
; PPC64LE-NEXT: mr 5, 3
; PPC64LE-NEXT: .LBB316_1:
; PPC64LE-NEXT: ldarx 3, 0, 5
-; PPC64LE-NEXT: cmpld 4, 3
-; PPC64LE-NEXT: ble 0, .LBB316_3
+; PPC64LE-NEXT: cmpld 3, 4
+; PPC64LE-NEXT: bgt 0, .LBB316_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 4, 0, 5
; PPC64LE-NEXT: bne 0, .LBB316_1
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB317_1:
; PPC64LE-NEXT: ldarx 5, 0, 3
-; PPC64LE-NEXT: cmpld 4, 5
-; PPC64LE-NEXT: ble 0, .LBB317_3
+; PPC64LE-NEXT: cmpld 5, 4
+; PPC64LE-NEXT: bgt 0, .LBB317_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB317_1
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB318_1:
; PPC64LE-NEXT: ldarx 5, 0, 3
-; PPC64LE-NEXT: cmpld 4, 5
-; PPC64LE-NEXT: ble 0, .LBB318_3
+; PPC64LE-NEXT: cmpld 5, 4
+; PPC64LE-NEXT: bgt 0, .LBB318_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB318_1
; PPC64LE-NEXT: sync
; PPC64LE-NEXT: .LBB319_1:
; PPC64LE-NEXT: ldarx 5, 0, 3
-; PPC64LE-NEXT: cmpld 4, 5
-; PPC64LE-NEXT: ble 0, .LBB319_3
+; PPC64LE-NEXT: cmpld 5, 4
+; PPC64LE-NEXT: bgt 0, .LBB319_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB319_1
; PPC64LE: # %bb.0:
; PPC64LE-NEXT: .LBB320_1:
; PPC64LE-NEXT: lbarx 5, 0, 3
-; PPC64LE-NEXT: cmplw 4, 5
-; PPC64LE-NEXT: bge 0, .LBB320_3
+; PPC64LE-NEXT: cmplw 5, 4
+; PPC64LE-NEXT: blt 0, .LBB320_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB320_1
; PPC64LE-NEXT: mr 5, 3
; PPC64LE-NEXT: .LBB321_1:
; PPC64LE-NEXT: lbarx 3, 0, 5
-; PPC64LE-NEXT: cmplw 4, 3
-; PPC64LE-NEXT: bge 0, .LBB321_3
+; PPC64LE-NEXT: cmplw 3, 4
+; PPC64LE-NEXT: blt 0, .LBB321_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 4, 0, 5
; PPC64LE-NEXT: bne 0, .LBB321_1
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB322_1:
; PPC64LE-NEXT: lbarx 5, 0, 3
-; PPC64LE-NEXT: cmplw 4, 5
-; PPC64LE-NEXT: bge 0, .LBB322_3
+; PPC64LE-NEXT: cmplw 5, 4
+; PPC64LE-NEXT: blt 0, .LBB322_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB322_1
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB323_1:
; PPC64LE-NEXT: lbarx 5, 0, 3
-; PPC64LE-NEXT: cmplw 4, 5
-; PPC64LE-NEXT: bge 0, .LBB323_3
+; PPC64LE-NEXT: cmplw 5, 4
+; PPC64LE-NEXT: blt 0, .LBB323_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB323_1
; PPC64LE-NEXT: sync
; PPC64LE-NEXT: .LBB324_1:
; PPC64LE-NEXT: lbarx 5, 0, 3
-; PPC64LE-NEXT: cmplw 4, 5
-; PPC64LE-NEXT: bge 0, .LBB324_3
+; PPC64LE-NEXT: cmplw 5, 4
+; PPC64LE-NEXT: blt 0, .LBB324_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB324_1
; PPC64LE: # %bb.0:
; PPC64LE-NEXT: .LBB325_1:
; PPC64LE-NEXT: lharx 5, 0, 3
-; PPC64LE-NEXT: cmplw 4, 5
-; PPC64LE-NEXT: bge 0, .LBB325_3
+; PPC64LE-NEXT: cmplw 5, 4
+; PPC64LE-NEXT: blt 0, .LBB325_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB325_1
; PPC64LE-NEXT: mr 5, 3
; PPC64LE-NEXT: .LBB326_1:
; PPC64LE-NEXT: lharx 3, 0, 5
-; PPC64LE-NEXT: cmplw 4, 3
-; PPC64LE-NEXT: bge 0, .LBB326_3
+; PPC64LE-NEXT: cmplw 3, 4
+; PPC64LE-NEXT: blt 0, .LBB326_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 4, 0, 5
; PPC64LE-NEXT: bne 0, .LBB326_1
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB327_1:
; PPC64LE-NEXT: lharx 5, 0, 3
-; PPC64LE-NEXT: cmplw 4, 5
-; PPC64LE-NEXT: bge 0, .LBB327_3
+; PPC64LE-NEXT: cmplw 5, 4
+; PPC64LE-NEXT: blt 0, .LBB327_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB327_1
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB328_1:
; PPC64LE-NEXT: lharx 5, 0, 3
-; PPC64LE-NEXT: cmplw 4, 5
-; PPC64LE-NEXT: bge 0, .LBB328_3
+; PPC64LE-NEXT: cmplw 5, 4
+; PPC64LE-NEXT: blt 0, .LBB328_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB328_1
; PPC64LE-NEXT: sync
; PPC64LE-NEXT: .LBB329_1:
; PPC64LE-NEXT: lharx 5, 0, 3
-; PPC64LE-NEXT: cmplw 4, 5
-; PPC64LE-NEXT: bge 0, .LBB329_3
+; PPC64LE-NEXT: cmplw 5, 4
+; PPC64LE-NEXT: blt 0, .LBB329_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB329_1
; PPC64LE: # %bb.0:
; PPC64LE-NEXT: .LBB330_1:
; PPC64LE-NEXT: lwarx 5, 0, 3
-; PPC64LE-NEXT: cmplw 4, 5
-; PPC64LE-NEXT: bge 0, .LBB330_3
+; PPC64LE-NEXT: cmplw 5, 4
+; PPC64LE-NEXT: blt 0, .LBB330_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB330_1
; PPC64LE-NEXT: mr 5, 3
; PPC64LE-NEXT: .LBB331_1:
; PPC64LE-NEXT: lwarx 3, 0, 5
-; PPC64LE-NEXT: cmplw 4, 3
-; PPC64LE-NEXT: bge 0, .LBB331_3
+; PPC64LE-NEXT: cmplw 3, 4
+; PPC64LE-NEXT: blt 0, .LBB331_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 4, 0, 5
; PPC64LE-NEXT: bne 0, .LBB331_1
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB332_1:
; PPC64LE-NEXT: lwarx 5, 0, 3
-; PPC64LE-NEXT: cmplw 4, 5
-; PPC64LE-NEXT: bge 0, .LBB332_3
+; PPC64LE-NEXT: cmplw 5, 4
+; PPC64LE-NEXT: blt 0, .LBB332_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB332_1
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB333_1:
; PPC64LE-NEXT: lwarx 5, 0, 3
-; PPC64LE-NEXT: cmplw 4, 5
-; PPC64LE-NEXT: bge 0, .LBB333_3
+; PPC64LE-NEXT: cmplw 5, 4
+; PPC64LE-NEXT: blt 0, .LBB333_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB333_1
; PPC64LE-NEXT: sync
; PPC64LE-NEXT: .LBB334_1:
; PPC64LE-NEXT: lwarx 5, 0, 3
-; PPC64LE-NEXT: cmplw 4, 5
-; PPC64LE-NEXT: bge 0, .LBB334_3
+; PPC64LE-NEXT: cmplw 5, 4
+; PPC64LE-NEXT: blt 0, .LBB334_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB334_1
; PPC64LE: # %bb.0:
; PPC64LE-NEXT: .LBB335_1:
; PPC64LE-NEXT: ldarx 5, 0, 3
-; PPC64LE-NEXT: cmpld 4, 5
-; PPC64LE-NEXT: bge 0, .LBB335_3
+; PPC64LE-NEXT: cmpld 5, 4
+; PPC64LE-NEXT: blt 0, .LBB335_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB335_1
; PPC64LE-NEXT: mr 5, 3
; PPC64LE-NEXT: .LBB336_1:
; PPC64LE-NEXT: ldarx 3, 0, 5
-; PPC64LE-NEXT: cmpld 4, 3
-; PPC64LE-NEXT: bge 0, .LBB336_3
+; PPC64LE-NEXT: cmpld 3, 4
+; PPC64LE-NEXT: blt 0, .LBB336_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 4, 0, 5
; PPC64LE-NEXT: bne 0, .LBB336_1
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB337_1:
; PPC64LE-NEXT: ldarx 5, 0, 3
-; PPC64LE-NEXT: cmpld 4, 5
-; PPC64LE-NEXT: bge 0, .LBB337_3
+; PPC64LE-NEXT: cmpld 5, 4
+; PPC64LE-NEXT: blt 0, .LBB337_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB337_1
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB338_1:
; PPC64LE-NEXT: ldarx 5, 0, 3
-; PPC64LE-NEXT: cmpld 4, 5
-; PPC64LE-NEXT: bge 0, .LBB338_3
+; PPC64LE-NEXT: cmpld 5, 4
+; PPC64LE-NEXT: blt 0, .LBB338_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB338_1
; PPC64LE-NEXT: sync
; PPC64LE-NEXT: .LBB339_1:
; PPC64LE-NEXT: ldarx 5, 0, 3
-; PPC64LE-NEXT: cmpld 4, 5
-; PPC64LE-NEXT: bge 0, .LBB339_3
+; PPC64LE-NEXT: cmpld 5, 4
+; PPC64LE-NEXT: blt 0, .LBB339_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB339_1
; PPC64LE-NEXT: .LBB480_1:
; PPC64LE-NEXT: lbarx 4, 0, 3
; PPC64LE-NEXT: extsb 6, 4
-; PPC64LE-NEXT: cmpw 5, 6
-; PPC64LE-NEXT: ble 0, .LBB480_3
+; PPC64LE-NEXT: cmpw 6, 5
+; PPC64LE-NEXT: bgt 0, .LBB480_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB480_1
; PPC64LE-NEXT: .LBB481_1:
; PPC64LE-NEXT: lbarx 4, 0, 3
; PPC64LE-NEXT: extsb 6, 4
-; PPC64LE-NEXT: cmpw 5, 6
-; PPC64LE-NEXT: ble 0, .LBB481_3
+; PPC64LE-NEXT: cmpw 6, 5
+; PPC64LE-NEXT: bgt 0, .LBB481_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB481_1
; PPC64LE-NEXT: .LBB482_1:
; PPC64LE-NEXT: lbarx 4, 0, 3
; PPC64LE-NEXT: extsb 6, 4
-; PPC64LE-NEXT: cmpw 5, 6
-; PPC64LE-NEXT: ble 0, .LBB482_3
+; PPC64LE-NEXT: cmpw 6, 5
+; PPC64LE-NEXT: bgt 0, .LBB482_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB482_1
; PPC64LE-NEXT: .LBB483_1:
; PPC64LE-NEXT: lbarx 4, 0, 3
; PPC64LE-NEXT: extsb 6, 4
-; PPC64LE-NEXT: cmpw 5, 6
-; PPC64LE-NEXT: ble 0, .LBB483_3
+; PPC64LE-NEXT: cmpw 6, 5
+; PPC64LE-NEXT: bgt 0, .LBB483_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB483_1
; PPC64LE-NEXT: .LBB484_1:
; PPC64LE-NEXT: lbarx 4, 0, 3
; PPC64LE-NEXT: extsb 6, 4
-; PPC64LE-NEXT: cmpw 5, 6
-; PPC64LE-NEXT: ble 0, .LBB484_3
+; PPC64LE-NEXT: cmpw 6, 5
+; PPC64LE-NEXT: bgt 0, .LBB484_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB484_1
; PPC64LE-NEXT: .LBB485_1:
; PPC64LE-NEXT: lharx 4, 0, 3
; PPC64LE-NEXT: extsh 6, 4
-; PPC64LE-NEXT: cmpw 5, 6
-; PPC64LE-NEXT: ble 0, .LBB485_3
+; PPC64LE-NEXT: cmpw 6, 5
+; PPC64LE-NEXT: bgt 0, .LBB485_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB485_1
; PPC64LE-NEXT: .LBB486_1:
; PPC64LE-NEXT: lharx 4, 0, 3
; PPC64LE-NEXT: extsh 6, 4
-; PPC64LE-NEXT: cmpw 5, 6
-; PPC64LE-NEXT: ble 0, .LBB486_3
+; PPC64LE-NEXT: cmpw 6, 5
+; PPC64LE-NEXT: bgt 0, .LBB486_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB486_1
; PPC64LE-NEXT: .LBB487_1:
; PPC64LE-NEXT: lharx 4, 0, 3
; PPC64LE-NEXT: extsh 6, 4
-; PPC64LE-NEXT: cmpw 5, 6
-; PPC64LE-NEXT: ble 0, .LBB487_3
+; PPC64LE-NEXT: cmpw 6, 5
+; PPC64LE-NEXT: bgt 0, .LBB487_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB487_1
; PPC64LE-NEXT: .LBB488_1:
; PPC64LE-NEXT: lharx 4, 0, 3
; PPC64LE-NEXT: extsh 6, 4
-; PPC64LE-NEXT: cmpw 5, 6
-; PPC64LE-NEXT: ble 0, .LBB488_3
+; PPC64LE-NEXT: cmpw 6, 5
+; PPC64LE-NEXT: bgt 0, .LBB488_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB488_1
; PPC64LE-NEXT: .LBB489_1:
; PPC64LE-NEXT: lharx 4, 0, 3
; PPC64LE-NEXT: extsh 6, 4
-; PPC64LE-NEXT: cmpw 5, 6
-; PPC64LE-NEXT: ble 0, .LBB489_3
+; PPC64LE-NEXT: cmpw 6, 5
+; PPC64LE-NEXT: bgt 0, .LBB489_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB489_1
; PPC64LE: # %bb.0:
; PPC64LE-NEXT: .LBB490_1:
; PPC64LE-NEXT: lwarx 5, 0, 3
-; PPC64LE-NEXT: cmpw 4, 5
-; PPC64LE-NEXT: ble 0, .LBB490_3
+; PPC64LE-NEXT: cmpw 5, 4
+; PPC64LE-NEXT: bgt 0, .LBB490_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB490_1
; PPC64LE-NEXT: mr 5, 3
; PPC64LE-NEXT: .LBB491_1:
; PPC64LE-NEXT: lwarx 3, 0, 5
-; PPC64LE-NEXT: cmpw 4, 3
-; PPC64LE-NEXT: ble 0, .LBB491_3
+; PPC64LE-NEXT: cmpw 3, 4
+; PPC64LE-NEXT: bgt 0, .LBB491_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 4, 0, 5
; PPC64LE-NEXT: bne 0, .LBB491_1
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB492_1:
; PPC64LE-NEXT: lwarx 5, 0, 3
-; PPC64LE-NEXT: cmpw 4, 5
-; PPC64LE-NEXT: ble 0, .LBB492_3
+; PPC64LE-NEXT: cmpw 5, 4
+; PPC64LE-NEXT: bgt 0, .LBB492_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB492_1
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB493_1:
; PPC64LE-NEXT: lwarx 5, 0, 3
-; PPC64LE-NEXT: cmpw 4, 5
-; PPC64LE-NEXT: ble 0, .LBB493_3
+; PPC64LE-NEXT: cmpw 5, 4
+; PPC64LE-NEXT: bgt 0, .LBB493_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB493_1
; PPC64LE-NEXT: sync
; PPC64LE-NEXT: .LBB494_1:
; PPC64LE-NEXT: lwarx 5, 0, 3
-; PPC64LE-NEXT: cmpw 4, 5
-; PPC64LE-NEXT: ble 0, .LBB494_3
+; PPC64LE-NEXT: cmpw 5, 4
+; PPC64LE-NEXT: bgt 0, .LBB494_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB494_1
; PPC64LE: # %bb.0:
; PPC64LE-NEXT: .LBB495_1:
; PPC64LE-NEXT: ldarx 5, 0, 3
-; PPC64LE-NEXT: cmpd 4, 5
-; PPC64LE-NEXT: ble 0, .LBB495_3
+; PPC64LE-NEXT: cmpd 5, 4
+; PPC64LE-NEXT: bgt 0, .LBB495_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB495_1
; PPC64LE-NEXT: mr 5, 3
; PPC64LE-NEXT: .LBB496_1:
; PPC64LE-NEXT: ldarx 3, 0, 5
-; PPC64LE-NEXT: cmpd 4, 3
-; PPC64LE-NEXT: ble 0, .LBB496_3
+; PPC64LE-NEXT: cmpd 3, 4
+; PPC64LE-NEXT: bgt 0, .LBB496_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 4, 0, 5
; PPC64LE-NEXT: bne 0, .LBB496_1
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB497_1:
; PPC64LE-NEXT: ldarx 5, 0, 3
-; PPC64LE-NEXT: cmpd 4, 5
-; PPC64LE-NEXT: ble 0, .LBB497_3
+; PPC64LE-NEXT: cmpd 5, 4
+; PPC64LE-NEXT: bgt 0, .LBB497_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB497_1
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB498_1:
; PPC64LE-NEXT: ldarx 5, 0, 3
-; PPC64LE-NEXT: cmpd 4, 5
-; PPC64LE-NEXT: ble 0, .LBB498_3
+; PPC64LE-NEXT: cmpd 5, 4
+; PPC64LE-NEXT: bgt 0, .LBB498_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB498_1
; PPC64LE-NEXT: sync
; PPC64LE-NEXT: .LBB499_1:
; PPC64LE-NEXT: ldarx 5, 0, 3
-; PPC64LE-NEXT: cmpd 4, 5
-; PPC64LE-NEXT: ble 0, .LBB499_3
+; PPC64LE-NEXT: cmpd 5, 4
+; PPC64LE-NEXT: bgt 0, .LBB499_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB499_1
; PPC64LE-NEXT: .LBB500_1:
; PPC64LE-NEXT: lbarx 4, 0, 3
; PPC64LE-NEXT: extsb 6, 4
-; PPC64LE-NEXT: cmpw 5, 6
-; PPC64LE-NEXT: bge 0, .LBB500_3
+; PPC64LE-NEXT: cmpw 6, 5
+; PPC64LE-NEXT: blt 0, .LBB500_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB500_1
; PPC64LE-NEXT: .LBB501_1:
; PPC64LE-NEXT: lbarx 4, 0, 3
; PPC64LE-NEXT: extsb 6, 4
-; PPC64LE-NEXT: cmpw 5, 6
-; PPC64LE-NEXT: bge 0, .LBB501_3
+; PPC64LE-NEXT: cmpw 6, 5
+; PPC64LE-NEXT: blt 0, .LBB501_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB501_1
; PPC64LE-NEXT: .LBB502_1:
; PPC64LE-NEXT: lbarx 4, 0, 3
; PPC64LE-NEXT: extsb 6, 4
-; PPC64LE-NEXT: cmpw 5, 6
-; PPC64LE-NEXT: bge 0, .LBB502_3
+; PPC64LE-NEXT: cmpw 6, 5
+; PPC64LE-NEXT: blt 0, .LBB502_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB502_1
; PPC64LE-NEXT: .LBB503_1:
; PPC64LE-NEXT: lbarx 4, 0, 3
; PPC64LE-NEXT: extsb 6, 4
-; PPC64LE-NEXT: cmpw 5, 6
-; PPC64LE-NEXT: bge 0, .LBB503_3
+; PPC64LE-NEXT: cmpw 6, 5
+; PPC64LE-NEXT: blt 0, .LBB503_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB503_1
; PPC64LE-NEXT: .LBB504_1:
; PPC64LE-NEXT: lbarx 4, 0, 3
; PPC64LE-NEXT: extsb 6, 4
-; PPC64LE-NEXT: cmpw 5, 6
-; PPC64LE-NEXT: bge 0, .LBB504_3
+; PPC64LE-NEXT: cmpw 6, 5
+; PPC64LE-NEXT: blt 0, .LBB504_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB504_1
; PPC64LE-NEXT: .LBB505_1:
; PPC64LE-NEXT: lharx 4, 0, 3
; PPC64LE-NEXT: extsh 6, 4
-; PPC64LE-NEXT: cmpw 5, 6
-; PPC64LE-NEXT: bge 0, .LBB505_3
+; PPC64LE-NEXT: cmpw 6, 5
+; PPC64LE-NEXT: blt 0, .LBB505_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB505_1
; PPC64LE-NEXT: .LBB506_1:
; PPC64LE-NEXT: lharx 4, 0, 3
; PPC64LE-NEXT: extsh 6, 4
-; PPC64LE-NEXT: cmpw 5, 6
-; PPC64LE-NEXT: bge 0, .LBB506_3
+; PPC64LE-NEXT: cmpw 6, 5
+; PPC64LE-NEXT: blt 0, .LBB506_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB506_1
; PPC64LE-NEXT: .LBB507_1:
; PPC64LE-NEXT: lharx 4, 0, 3
; PPC64LE-NEXT: extsh 6, 4
-; PPC64LE-NEXT: cmpw 5, 6
-; PPC64LE-NEXT: bge 0, .LBB507_3
+; PPC64LE-NEXT: cmpw 6, 5
+; PPC64LE-NEXT: blt 0, .LBB507_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB507_1
; PPC64LE-NEXT: .LBB508_1:
; PPC64LE-NEXT: lharx 4, 0, 3
; PPC64LE-NEXT: extsh 6, 4
-; PPC64LE-NEXT: cmpw 5, 6
-; PPC64LE-NEXT: bge 0, .LBB508_3
+; PPC64LE-NEXT: cmpw 6, 5
+; PPC64LE-NEXT: blt 0, .LBB508_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB508_1
; PPC64LE-NEXT: .LBB509_1:
; PPC64LE-NEXT: lharx 4, 0, 3
; PPC64LE-NEXT: extsh 6, 4
-; PPC64LE-NEXT: cmpw 5, 6
-; PPC64LE-NEXT: bge 0, .LBB509_3
+; PPC64LE-NEXT: cmpw 6, 5
+; PPC64LE-NEXT: blt 0, .LBB509_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 5, 0, 3
; PPC64LE-NEXT: bne 0, .LBB509_1
; PPC64LE: # %bb.0:
; PPC64LE-NEXT: .LBB510_1:
; PPC64LE-NEXT: lwarx 5, 0, 3
-; PPC64LE-NEXT: cmpw 4, 5
-; PPC64LE-NEXT: bge 0, .LBB510_3
+; PPC64LE-NEXT: cmpw 5, 4
+; PPC64LE-NEXT: blt 0, .LBB510_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB510_1
; PPC64LE-NEXT: mr 5, 3
; PPC64LE-NEXT: .LBB511_1:
; PPC64LE-NEXT: lwarx 3, 0, 5
-; PPC64LE-NEXT: cmpw 4, 3
-; PPC64LE-NEXT: bge 0, .LBB511_3
+; PPC64LE-NEXT: cmpw 3, 4
+; PPC64LE-NEXT: blt 0, .LBB511_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 4, 0, 5
; PPC64LE-NEXT: bne 0, .LBB511_1
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB512_1:
; PPC64LE-NEXT: lwarx 5, 0, 3
-; PPC64LE-NEXT: cmpw 4, 5
-; PPC64LE-NEXT: bge 0, .LBB512_3
+; PPC64LE-NEXT: cmpw 5, 4
+; PPC64LE-NEXT: blt 0, .LBB512_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB512_1
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB513_1:
; PPC64LE-NEXT: lwarx 5, 0, 3
-; PPC64LE-NEXT: cmpw 4, 5
-; PPC64LE-NEXT: bge 0, .LBB513_3
+; PPC64LE-NEXT: cmpw 5, 4
+; PPC64LE-NEXT: blt 0, .LBB513_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB513_1
; PPC64LE-NEXT: sync
; PPC64LE-NEXT: .LBB514_1:
; PPC64LE-NEXT: lwarx 5, 0, 3
-; PPC64LE-NEXT: cmpw 4, 5
-; PPC64LE-NEXT: bge 0, .LBB514_3
+; PPC64LE-NEXT: cmpw 5, 4
+; PPC64LE-NEXT: blt 0, .LBB514_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB514_1
; PPC64LE: # %bb.0:
; PPC64LE-NEXT: .LBB515_1:
; PPC64LE-NEXT: ldarx 5, 0, 3
-; PPC64LE-NEXT: cmpd 4, 5
-; PPC64LE-NEXT: bge 0, .LBB515_3
+; PPC64LE-NEXT: cmpd 5, 4
+; PPC64LE-NEXT: blt 0, .LBB515_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB515_1
; PPC64LE-NEXT: mr 5, 3
; PPC64LE-NEXT: .LBB516_1:
; PPC64LE-NEXT: ldarx 3, 0, 5
-; PPC64LE-NEXT: cmpd 4, 3
-; PPC64LE-NEXT: bge 0, .LBB516_3
+; PPC64LE-NEXT: cmpd 3, 4
+; PPC64LE-NEXT: blt 0, .LBB516_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 4, 0, 5
; PPC64LE-NEXT: bne 0, .LBB516_1
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB517_1:
; PPC64LE-NEXT: ldarx 5, 0, 3
-; PPC64LE-NEXT: cmpd 4, 5
-; PPC64LE-NEXT: bge 0, .LBB517_3
+; PPC64LE-NEXT: cmpd 5, 4
+; PPC64LE-NEXT: blt 0, .LBB517_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB517_1
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB518_1:
; PPC64LE-NEXT: ldarx 5, 0, 3
-; PPC64LE-NEXT: cmpd 4, 5
-; PPC64LE-NEXT: bge 0, .LBB518_3
+; PPC64LE-NEXT: cmpd 5, 4
+; PPC64LE-NEXT: blt 0, .LBB518_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB518_1
; PPC64LE-NEXT: sync
; PPC64LE-NEXT: .LBB519_1:
; PPC64LE-NEXT: ldarx 5, 0, 3
-; PPC64LE-NEXT: cmpd 4, 5
-; PPC64LE-NEXT: bge 0, .LBB519_3
+; PPC64LE-NEXT: cmpd 5, 4
+; PPC64LE-NEXT: blt 0, .LBB519_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB519_1
; PPC64LE: # %bb.0:
; PPC64LE-NEXT: .LBB520_1:
; PPC64LE-NEXT: lbarx 5, 0, 3
-; PPC64LE-NEXT: cmplw 4, 5
-; PPC64LE-NEXT: ble 0, .LBB520_3
+; PPC64LE-NEXT: cmplw 5, 4
+; PPC64LE-NEXT: bgt 0, .LBB520_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB520_1
; PPC64LE-NEXT: mr 5, 3
; PPC64LE-NEXT: .LBB521_1:
; PPC64LE-NEXT: lbarx 3, 0, 5
-; PPC64LE-NEXT: cmplw 4, 3
-; PPC64LE-NEXT: ble 0, .LBB521_3
+; PPC64LE-NEXT: cmplw 3, 4
+; PPC64LE-NEXT: bgt 0, .LBB521_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 4, 0, 5
; PPC64LE-NEXT: bne 0, .LBB521_1
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB522_1:
; PPC64LE-NEXT: lbarx 5, 0, 3
-; PPC64LE-NEXT: cmplw 4, 5
-; PPC64LE-NEXT: ble 0, .LBB522_3
+; PPC64LE-NEXT: cmplw 5, 4
+; PPC64LE-NEXT: bgt 0, .LBB522_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB522_1
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB523_1:
; PPC64LE-NEXT: lbarx 5, 0, 3
-; PPC64LE-NEXT: cmplw 4, 5
-; PPC64LE-NEXT: ble 0, .LBB523_3
+; PPC64LE-NEXT: cmplw 5, 4
+; PPC64LE-NEXT: bgt 0, .LBB523_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB523_1
; PPC64LE-NEXT: sync
; PPC64LE-NEXT: .LBB524_1:
; PPC64LE-NEXT: lbarx 5, 0, 3
-; PPC64LE-NEXT: cmplw 4, 5
-; PPC64LE-NEXT: ble 0, .LBB524_3
+; PPC64LE-NEXT: cmplw 5, 4
+; PPC64LE-NEXT: bgt 0, .LBB524_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB524_1
; PPC64LE: # %bb.0:
; PPC64LE-NEXT: .LBB525_1:
; PPC64LE-NEXT: lharx 5, 0, 3
-; PPC64LE-NEXT: cmplw 4, 5
-; PPC64LE-NEXT: ble 0, .LBB525_3
+; PPC64LE-NEXT: cmplw 5, 4
+; PPC64LE-NEXT: bgt 0, .LBB525_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB525_1
; PPC64LE-NEXT: mr 5, 3
; PPC64LE-NEXT: .LBB526_1:
; PPC64LE-NEXT: lharx 3, 0, 5
-; PPC64LE-NEXT: cmplw 4, 3
-; PPC64LE-NEXT: ble 0, .LBB526_3
+; PPC64LE-NEXT: cmplw 3, 4
+; PPC64LE-NEXT: bgt 0, .LBB526_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 4, 0, 5
; PPC64LE-NEXT: bne 0, .LBB526_1
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB527_1:
; PPC64LE-NEXT: lharx 5, 0, 3
-; PPC64LE-NEXT: cmplw 4, 5
-; PPC64LE-NEXT: ble 0, .LBB527_3
+; PPC64LE-NEXT: cmplw 5, 4
+; PPC64LE-NEXT: bgt 0, .LBB527_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB527_1
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB528_1:
; PPC64LE-NEXT: lharx 5, 0, 3
-; PPC64LE-NEXT: cmplw 4, 5
-; PPC64LE-NEXT: ble 0, .LBB528_3
+; PPC64LE-NEXT: cmplw 5, 4
+; PPC64LE-NEXT: bgt 0, .LBB528_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB528_1
; PPC64LE-NEXT: sync
; PPC64LE-NEXT: .LBB529_1:
; PPC64LE-NEXT: lharx 5, 0, 3
-; PPC64LE-NEXT: cmplw 4, 5
-; PPC64LE-NEXT: ble 0, .LBB529_3
+; PPC64LE-NEXT: cmplw 5, 4
+; PPC64LE-NEXT: bgt 0, .LBB529_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB529_1
; PPC64LE: # %bb.0:
; PPC64LE-NEXT: .LBB530_1:
; PPC64LE-NEXT: lwarx 5, 0, 3
-; PPC64LE-NEXT: cmplw 4, 5
-; PPC64LE-NEXT: ble 0, .LBB530_3
+; PPC64LE-NEXT: cmplw 5, 4
+; PPC64LE-NEXT: bgt 0, .LBB530_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB530_1
; PPC64LE-NEXT: mr 5, 3
; PPC64LE-NEXT: .LBB531_1:
; PPC64LE-NEXT: lwarx 3, 0, 5
-; PPC64LE-NEXT: cmplw 4, 3
-; PPC64LE-NEXT: ble 0, .LBB531_3
+; PPC64LE-NEXT: cmplw 3, 4
+; PPC64LE-NEXT: bgt 0, .LBB531_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 4, 0, 5
; PPC64LE-NEXT: bne 0, .LBB531_1
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB532_1:
; PPC64LE-NEXT: lwarx 5, 0, 3
-; PPC64LE-NEXT: cmplw 4, 5
-; PPC64LE-NEXT: ble 0, .LBB532_3
+; PPC64LE-NEXT: cmplw 5, 4
+; PPC64LE-NEXT: bgt 0, .LBB532_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB532_1
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB533_1:
; PPC64LE-NEXT: lwarx 5, 0, 3
-; PPC64LE-NEXT: cmplw 4, 5
-; PPC64LE-NEXT: ble 0, .LBB533_3
+; PPC64LE-NEXT: cmplw 5, 4
+; PPC64LE-NEXT: bgt 0, .LBB533_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB533_1
; PPC64LE-NEXT: sync
; PPC64LE-NEXT: .LBB534_1:
; PPC64LE-NEXT: lwarx 5, 0, 3
-; PPC64LE-NEXT: cmplw 4, 5
-; PPC64LE-NEXT: ble 0, .LBB534_3
+; PPC64LE-NEXT: cmplw 5, 4
+; PPC64LE-NEXT: bgt 0, .LBB534_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB534_1
; PPC64LE: # %bb.0:
; PPC64LE-NEXT: .LBB535_1:
; PPC64LE-NEXT: ldarx 5, 0, 3
-; PPC64LE-NEXT: cmpld 4, 5
-; PPC64LE-NEXT: ble 0, .LBB535_3
+; PPC64LE-NEXT: cmpld 5, 4
+; PPC64LE-NEXT: bgt 0, .LBB535_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB535_1
; PPC64LE-NEXT: mr 5, 3
; PPC64LE-NEXT: .LBB536_1:
; PPC64LE-NEXT: ldarx 3, 0, 5
-; PPC64LE-NEXT: cmpld 4, 3
-; PPC64LE-NEXT: ble 0, .LBB536_3
+; PPC64LE-NEXT: cmpld 3, 4
+; PPC64LE-NEXT: bgt 0, .LBB536_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 4, 0, 5
; PPC64LE-NEXT: bne 0, .LBB536_1
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB537_1:
; PPC64LE-NEXT: ldarx 5, 0, 3
-; PPC64LE-NEXT: cmpld 4, 5
-; PPC64LE-NEXT: ble 0, .LBB537_3
+; PPC64LE-NEXT: cmpld 5, 4
+; PPC64LE-NEXT: bgt 0, .LBB537_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB537_1
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB538_1:
; PPC64LE-NEXT: ldarx 5, 0, 3
-; PPC64LE-NEXT: cmpld 4, 5
-; PPC64LE-NEXT: ble 0, .LBB538_3
+; PPC64LE-NEXT: cmpld 5, 4
+; PPC64LE-NEXT: bgt 0, .LBB538_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB538_1
; PPC64LE-NEXT: sync
; PPC64LE-NEXT: .LBB539_1:
; PPC64LE-NEXT: ldarx 5, 0, 3
-; PPC64LE-NEXT: cmpld 4, 5
-; PPC64LE-NEXT: ble 0, .LBB539_3
+; PPC64LE-NEXT: cmpld 5, 4
+; PPC64LE-NEXT: bgt 0, .LBB539_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB539_1
; PPC64LE: # %bb.0:
; PPC64LE-NEXT: .LBB540_1:
; PPC64LE-NEXT: lbarx 5, 0, 3
-; PPC64LE-NEXT: cmplw 4, 5
-; PPC64LE-NEXT: bge 0, .LBB540_3
+; PPC64LE-NEXT: cmplw 5, 4
+; PPC64LE-NEXT: blt 0, .LBB540_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB540_1
; PPC64LE-NEXT: mr 5, 3
; PPC64LE-NEXT: .LBB541_1:
; PPC64LE-NEXT: lbarx 3, 0, 5
-; PPC64LE-NEXT: cmplw 4, 3
-; PPC64LE-NEXT: bge 0, .LBB541_3
+; PPC64LE-NEXT: cmplw 3, 4
+; PPC64LE-NEXT: blt 0, .LBB541_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 4, 0, 5
; PPC64LE-NEXT: bne 0, .LBB541_1
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB542_1:
; PPC64LE-NEXT: lbarx 5, 0, 3
-; PPC64LE-NEXT: cmplw 4, 5
-; PPC64LE-NEXT: bge 0, .LBB542_3
+; PPC64LE-NEXT: cmplw 5, 4
+; PPC64LE-NEXT: blt 0, .LBB542_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB542_1
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB543_1:
; PPC64LE-NEXT: lbarx 5, 0, 3
-; PPC64LE-NEXT: cmplw 4, 5
-; PPC64LE-NEXT: bge 0, .LBB543_3
+; PPC64LE-NEXT: cmplw 5, 4
+; PPC64LE-NEXT: blt 0, .LBB543_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB543_1
; PPC64LE-NEXT: sync
; PPC64LE-NEXT: .LBB544_1:
; PPC64LE-NEXT: lbarx 5, 0, 3
-; PPC64LE-NEXT: cmplw 4, 5
-; PPC64LE-NEXT: bge 0, .LBB544_3
+; PPC64LE-NEXT: cmplw 5, 4
+; PPC64LE-NEXT: blt 0, .LBB544_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stbcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB544_1
; PPC64LE: # %bb.0:
; PPC64LE-NEXT: .LBB545_1:
; PPC64LE-NEXT: lharx 5, 0, 3
-; PPC64LE-NEXT: cmplw 4, 5
-; PPC64LE-NEXT: bge 0, .LBB545_3
+; PPC64LE-NEXT: cmplw 5, 4
+; PPC64LE-NEXT: blt 0, .LBB545_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB545_1
; PPC64LE-NEXT: mr 5, 3
; PPC64LE-NEXT: .LBB546_1:
; PPC64LE-NEXT: lharx 3, 0, 5
-; PPC64LE-NEXT: cmplw 4, 3
-; PPC64LE-NEXT: bge 0, .LBB546_3
+; PPC64LE-NEXT: cmplw 3, 4
+; PPC64LE-NEXT: blt 0, .LBB546_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 4, 0, 5
; PPC64LE-NEXT: bne 0, .LBB546_1
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB547_1:
; PPC64LE-NEXT: lharx 5, 0, 3
-; PPC64LE-NEXT: cmplw 4, 5
-; PPC64LE-NEXT: bge 0, .LBB547_3
+; PPC64LE-NEXT: cmplw 5, 4
+; PPC64LE-NEXT: blt 0, .LBB547_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB547_1
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB548_1:
; PPC64LE-NEXT: lharx 5, 0, 3
-; PPC64LE-NEXT: cmplw 4, 5
-; PPC64LE-NEXT: bge 0, .LBB548_3
+; PPC64LE-NEXT: cmplw 5, 4
+; PPC64LE-NEXT: blt 0, .LBB548_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB548_1
; PPC64LE-NEXT: sync
; PPC64LE-NEXT: .LBB549_1:
; PPC64LE-NEXT: lharx 5, 0, 3
-; PPC64LE-NEXT: cmplw 4, 5
-; PPC64LE-NEXT: bge 0, .LBB549_3
+; PPC64LE-NEXT: cmplw 5, 4
+; PPC64LE-NEXT: blt 0, .LBB549_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: sthcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB549_1
; PPC64LE: # %bb.0:
; PPC64LE-NEXT: .LBB550_1:
; PPC64LE-NEXT: lwarx 5, 0, 3
-; PPC64LE-NEXT: cmplw 4, 5
-; PPC64LE-NEXT: bge 0, .LBB550_3
+; PPC64LE-NEXT: cmplw 5, 4
+; PPC64LE-NEXT: blt 0, .LBB550_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB550_1
; PPC64LE-NEXT: mr 5, 3
; PPC64LE-NEXT: .LBB551_1:
; PPC64LE-NEXT: lwarx 3, 0, 5
-; PPC64LE-NEXT: cmplw 4, 3
-; PPC64LE-NEXT: bge 0, .LBB551_3
+; PPC64LE-NEXT: cmplw 3, 4
+; PPC64LE-NEXT: blt 0, .LBB551_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 4, 0, 5
; PPC64LE-NEXT: bne 0, .LBB551_1
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB552_1:
; PPC64LE-NEXT: lwarx 5, 0, 3
-; PPC64LE-NEXT: cmplw 4, 5
-; PPC64LE-NEXT: bge 0, .LBB552_3
+; PPC64LE-NEXT: cmplw 5, 4
+; PPC64LE-NEXT: blt 0, .LBB552_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB552_1
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB553_1:
; PPC64LE-NEXT: lwarx 5, 0, 3
-; PPC64LE-NEXT: cmplw 4, 5
-; PPC64LE-NEXT: bge 0, .LBB553_3
+; PPC64LE-NEXT: cmplw 5, 4
+; PPC64LE-NEXT: blt 0, .LBB553_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB553_1
; PPC64LE-NEXT: sync
; PPC64LE-NEXT: .LBB554_1:
; PPC64LE-NEXT: lwarx 5, 0, 3
-; PPC64LE-NEXT: cmplw 4, 5
-; PPC64LE-NEXT: bge 0, .LBB554_3
+; PPC64LE-NEXT: cmplw 5, 4
+; PPC64LE-NEXT: blt 0, .LBB554_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stwcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB554_1
; PPC64LE: # %bb.0:
; PPC64LE-NEXT: .LBB555_1:
; PPC64LE-NEXT: ldarx 5, 0, 3
-; PPC64LE-NEXT: cmpld 4, 5
-; PPC64LE-NEXT: bge 0, .LBB555_3
+; PPC64LE-NEXT: cmpld 5, 4
+; PPC64LE-NEXT: blt 0, .LBB555_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB555_1
; PPC64LE-NEXT: mr 5, 3
; PPC64LE-NEXT: .LBB556_1:
; PPC64LE-NEXT: ldarx 3, 0, 5
-; PPC64LE-NEXT: cmpld 4, 3
-; PPC64LE-NEXT: bge 0, .LBB556_3
+; PPC64LE-NEXT: cmpld 3, 4
+; PPC64LE-NEXT: blt 0, .LBB556_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 4, 0, 5
; PPC64LE-NEXT: bne 0, .LBB556_1
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB557_1:
; PPC64LE-NEXT: ldarx 5, 0, 3
-; PPC64LE-NEXT: cmpld 4, 5
-; PPC64LE-NEXT: bge 0, .LBB557_3
+; PPC64LE-NEXT: cmpld 5, 4
+; PPC64LE-NEXT: blt 0, .LBB557_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB557_1
; PPC64LE-NEXT: lwsync
; PPC64LE-NEXT: .LBB558_1:
; PPC64LE-NEXT: ldarx 5, 0, 3
-; PPC64LE-NEXT: cmpld 4, 5
-; PPC64LE-NEXT: bge 0, .LBB558_3
+; PPC64LE-NEXT: cmpld 5, 4
+; PPC64LE-NEXT: blt 0, .LBB558_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB558_1
; PPC64LE-NEXT: sync
; PPC64LE-NEXT: .LBB559_1:
; PPC64LE-NEXT: ldarx 5, 0, 3
-; PPC64LE-NEXT: cmpld 4, 5
-; PPC64LE-NEXT: bge 0, .LBB559_3
+; PPC64LE-NEXT: cmpld 5, 4
+; PPC64LE-NEXT: blt 0, .LBB559_3
; PPC64LE-NEXT: # %bb.2:
; PPC64LE-NEXT: stdcx. 4, 0, 3
; PPC64LE-NEXT: bne 0, .LBB559_1