Skip to content

Commit 8ae73fe

Browse files
author
Kai Luo
committed
[PowerPC] Precommit test for #72845. NFC.
1 parent 2cc111e commit 8ae73fe

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4
2+
; RUN: llc -verify-machineinstrs -mtriple=powerpc64-ibm-aix < %s | FileCheck %s
3+
4+
define noundef signext i32 @ham(ptr nocapture noundef %arg) #0 {
5+
; CHECK-LABEL: ham:
6+
; CHECK: # %bb.0: # %bb
7+
; CHECK-NEXT: lwz 4, 0(3)
8+
; CHECK-NEXT: cmpwi 4, 750
9+
; CHECK-NEXT: addi 5, 4, 1
10+
; CHECK-NEXT: li 4, 1
11+
; CHECK-NEXT: bc 12, 0, L..BB0_1
12+
; CHECK-NEXT: b L..BB0_2
13+
; CHECK-NEXT: L..BB0_1: # %bb
14+
; CHECK-NEXT: addi 4, 5, 0
15+
; CHECK-NEXT: L..BB0_2: # %bb
16+
; CHECK-NEXT: stw 4, 0(3)
17+
; CHECK-NEXT: li 3, 0
18+
; CHECK-NEXT: blr
19+
bb:
20+
%load = load i32, ptr %arg, align 4
21+
%icmp = icmp slt i32 %load, 750
22+
%add = add nsw i32 %load, 1
23+
%select = select i1 %icmp, i32 %add, i32 1
24+
store i32 %select, ptr %arg, align 4
25+
ret i32 0
26+
}
27+
28+
attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="pwr8" "target-features"="+altivec,+bpermd,+crbits,+crypto,+direct-move,+extdiv,+htm,+isa-v206-instructions,+isa-v207-instructions,+power8-vector,+quadword-atomics,+vsx,-aix-small-local-exec-tls,-isa-v30-instructions,-isel,-power9-vector,-privileged,-rop-protect,-spe" }

0 commit comments

Comments
 (0)