source: icGREP/icgrep-devel/llvm-3.8.0.src/test/CodeGen/ARM/umulo-32.ll @ 5027

Last change on this file since 5027 was 5027, checked in by cameron, 3 years ago

Upgrade to llvm 3.8

File size: 1.1 KB
Line 
1; RUN: llc < %s -mtriple=thumbv6-apple-darwin | FileCheck %s
2
3%umul.ty = type { i32, i1 }
4
5define i32 @test1(i32 %a) nounwind {
6; CHECK: test1:
7; CHECK: muldi3
8  %tmp0 = tail call %umul.ty @llvm.umul.with.overflow.i32(i32 %a, i32 37)
9  %tmp1 = extractvalue %umul.ty %tmp0, 0
10  %tmp2 = select i1 undef, i32 -1, i32 %tmp1
11  ret i32 %tmp2
12}
13
14declare %umul.ty @llvm.umul.with.overflow.i32(i32, i32) nounwind readnone
15
16define i32 @test2(i32 %argc, i8** %argv) ssp {
17; CHECK: test2:
18; CHECK: str     r0
19; CHECK: movs    r2
20; CHECK: mov     r1
21; CHECK: mov     r3
22; CHECK: muldi3
23%1 = alloca i32, align 4
24%2 = alloca i32, align 4
25%3 = alloca i8**, align 4
26%m_degree = alloca i32, align 4
27store i32 0, i32* %1
28store i32 %argc, i32* %2, align 4
29store i8** %argv, i8*** %3, align 4
30store i32 10, i32* %m_degree, align 4
31%4 = load i32, i32* %m_degree, align 4
32%5 = call %umul.ty @llvm.umul.with.overflow.i32(i32 %4, i32 8)
33%6 = extractvalue %umul.ty %5, 1
34%7 = extractvalue %umul.ty %5, 0
35%8 = select i1 %6, i32 -1, i32 %7
36%9 = call noalias i8* @_Znam(i32 %8)
37%10 = bitcast i8* %9 to double*
38ret i32 0
39}
40
41declare noalias i8* @_Znam(i32)
Note: See TracBrowser for help on using the repository browser.