1 ; RUN: llc -O3 -o - %s | FileCheck %s
2 ; Test case from PR16882.
3 target triple = "thumbv7a-none-eabi"
9 tail call void @overflow() #0
13 ; Function Attrs: noreturn nounwind
14 declare void @overflow() #0
16 define i32 @test2(i32 %x, i32 %y) {
21 %conv = sext i32 %x to i64
22 %conv1 = sext i32 %y to i64
23 %mul = mul nsw i64 %conv1, %conv
24 %conv2 = trunc i64 %mul to i32
25 %conv3 = sext i32 %conv2 to i64
26 %cmp = icmp eq i64 %mul, %conv3
27 br i1 %cmp, label %if.end, label %if.then
29 if.then: ; preds = %entry
30 tail call void @overflow() #0
33 if.end: ; preds = %entry
37 ; Test case for PR17825.
42 tail call void @overflow_with_unwind() #1
46 ; Test case for uwtable
47 define i32 @test4() uwtable {
51 tail call void @overflow() #0
55 define i32 @test5() uwtable {
59 tail call void @overflow_with_unwind() #1
64 define i32 @test1_nofpelim() "no-frame-pointer-elim"="true" {
65 ; CHECK-LABEL: @test1_nofpelim
68 tail call void @overflow() #0
72 define i32 @test2_nofpelim(i32 %x, i32 %y) "no-frame-pointer-elim"="true" {
73 ; CHECK-LABEL: @test2_nofpelim
76 %conv = sext i32 %x to i64
77 %conv1 = sext i32 %y to i64
78 %mul = mul nsw i64 %conv1, %conv
79 %conv2 = trunc i64 %mul to i32
80 %conv3 = sext i32 %conv2 to i64
81 %cmp = icmp eq i64 %mul, %conv3
82 br i1 %cmp, label %if.end, label %if.then
84 if.then: ; preds = %entry
85 tail call void @overflow() #0
88 if.end: ; preds = %entry
92 ; Test case for PR17825.
93 define i32 @test3_nofpelim() "no-frame-pointer-elim"="true" {
94 ; CHECK-LABEL: @test3_nofpelim
97 tail call void @overflow_with_unwind() #1
101 ; Test case for uwtable
102 define i32 @test4_nofpelim() uwtable "no-frame-pointer-elim"="true" {
103 ; CHECK-LABEL: @test4_nofpelim
106 tail call void @overflow() #0
110 define i32 @test5_nofpelim() uwtable "no-frame-pointer-elim"="true" {
111 ; CHECK-LABEL: @test5_nofpelim
114 tail call void @overflow_with_unwind() #1
118 ; Function Attrs: noreturn
119 declare void @overflow_with_unwind() #1
121 attributes #0 = { noreturn nounwind }
122 attributes #1 = { noreturn }