xref: /llvm-project/llvm/test/CodeGen/PowerPC/ctrloop-i128.ll (revision 427fb35192f1f7bb694a5910b05abc5925a798b2)
1; RUN: llc -O1 -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu < %s
2; RUN: llc -O1 -verify-machineinstrs -mtriple=powerpc64-ibm-aix-xcoff < %s
3
4; Function Attrs: uwtable
5define fastcc void @_Crash_Fn() unnamed_addr #0 {
6entry-block:
7  br label %_Label_0
8
9_Label_0:                                         ; preds = %_Label_0, %entry-block
10  %result.0138 = phi i128 [ %5, %_Label_0 ], [ 0, %entry-block ]
11  %iter.sroa.0.0137 = phi ptr [ %0, %_Label_0 ], [ undef, %entry-block ]
12  %0 = getelementptr inbounds i8, ptr %iter.sroa.0.0137, i64 1
13  %1 = tail call { i128, i1 } @llvm.smul.with.overflow.i128(i128 %result.0138, i128 undef) #2
14  %2 = extractvalue { i128, i1 } %1, 0
15  %3 = tail call { i128, i1 } @llvm.sadd.with.overflow.i128(i128 %2, i128 0) #2
16  %4 = extractvalue { i128, i1 } %3, 1
17  %5 = extractvalue { i128, i1 } %3, 0
18  %6 = icmp eq ptr %0, null
19  br i1 %6, label %bb66.loopexit, label %_Label_0
20
21bb66.loopexit:                                    ; preds = %_Label_0
22  unreachable
23}
24
25; Function Attrs: nounwind readnone
26declare { i128, i1 } @llvm.sadd.with.overflow.i128(i128, i128) #1
27
28; Function Attrs: nounwind readnone
29declare { i128, i1 } @llvm.smul.with.overflow.i128(i128, i128) #1
30
31attributes #0 = { uwtable }
32attributes #1 = { nounwind readnone }
33attributes #2 = { nounwind }
34