Skip to content

Commit 66d350a

Browse files
committed
[PowerPC][NFC] Pre-commit test case to prepare for patch to custom lower ssubo
1 parent 45b567b commit 66d350a

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

llvm/test/CodeGen/PowerPC/ssubo-32.ll

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2+
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64le-unknown-linux-gnu | FileCheck %s
3+
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-aix | FileCheck %s
4+
; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-aix | FileCheck %s
5+
6+
define i1 @subovfi_i32(i32 noundef %a, i32 noundef %b, ptr %c) {
7+
; CHECK-LABEL: subovfi_i32:
8+
; CHECK: # %bb.0: # %entry
9+
; CHECK-NEXT: sub 6, 3, 4
10+
; CHECK-NEXT: cmpwi 1, 4, 0
11+
; CHECK-NEXT: cmpw 6, 3
12+
; CHECK-NEXT: li 3, 1
13+
; CHECK-NEXT: stw 6, 0(5)
14+
; CHECK-NEXT: creqv 20, 5, 0
15+
; CHECK-NEXT: isel 3, 0, 3, 20
16+
; CHECK-NEXT: blr
17+
entry:
18+
%0 = call { i32, i1 } @llvm.ssub.with.overflow.i32(i32 %a, i32 %b)
19+
%1 = extractvalue { i32, i1 } %0, 1
20+
%2 = extractvalue { i32, i1 } %0, 0
21+
store i32 %2, ptr %c, align 4
22+
ret i1 %1
23+
}
24+
25+
declare { i32, i1 } @llvm.ssub.with.overflow.i32(i32, i32)
26+

0 commit comments

Comments
 (0)