Daniel Sanders | 8008de5 | 2015-10-15 14:34:23 +0000 | [diff] [blame] | 1 | ; RUN: llc -mtriple=mipsel-linux-gnu -march=mipsel -mattr=mips16 -mattr=+soft-float -mips16-hard-float -relocation-model=static -O0 < %s | FileCheck %s -check-prefix=lcb |
Reed Kotler | ad450f2 | 2013-11-29 22:32:56 +0000 | [diff] [blame] | 2 | |
| 3 | @i = global i32 0, align 4 |
| 4 | @j = common global i32 0, align 4 |
| 5 | @k = common global i32 0, align 4 |
| 6 | |
| 7 | ; Function Attrs: nounwind |
| 8 | define i32 @s() #0 { |
| 9 | entry: |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 10 | %0 = load i32, i32* @i, align 4 |
Reed Kotler | ad450f2 | 2013-11-29 22:32:56 +0000 | [diff] [blame] | 11 | %cmp = icmp eq i32 %0, 0 |
| 12 | br i1 %cmp, label %if.then, label %if.else |
| 13 | |
| 14 | if.then: ; preds = %entry |
| 15 | store i32 0, i32* @i, align 4 |
| 16 | call void asm sideeffect ".space 1000", ""() #1, !srcloc !1 |
| 17 | br label %if.end |
| 18 | |
| 19 | if.else: ; preds = %entry |
| 20 | store i32 1, i32* @i, align 4 |
| 21 | br label %if.end |
| 22 | |
| 23 | if.end: ; preds = %if.else, %if.then |
| 24 | ret i32 0 |
| 25 | ; lcb: bnez $2, $BB0_2 |
| 26 | ; lcb: b $BB0_1 # 16 bit inst |
| 27 | ; lcb: $BB0_1: # %if.then |
| 28 | } |
| 29 | |
| 30 | ; Function Attrs: nounwind |
| 31 | define i32 @b() #0 { |
| 32 | entry: |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 33 | %0 = load i32, i32* @i, align 4 |
Reed Kotler | ad450f2 | 2013-11-29 22:32:56 +0000 | [diff] [blame] | 34 | %cmp = icmp eq i32 %0, 0 |
| 35 | br i1 %cmp, label %if.then, label %if.else |
| 36 | |
| 37 | if.then: ; preds = %entry |
| 38 | store i32 0, i32* @i, align 4 |
| 39 | call void asm sideeffect ".space 1000000", ""() #1, !srcloc !2 |
| 40 | br label %if.end |
| 41 | |
| 42 | if.else: ; preds = %entry |
| 43 | store i32 1, i32* @i, align 4 |
| 44 | br label %if.end |
| 45 | |
| 46 | if.end: ; preds = %if.else, %if.then |
| 47 | ret i32 0 |
| 48 | } |
| 49 | |
| 50 | ; lcb: beqz $2, $BB1_1 # 16 bit inst |
| 51 | ; lcb: jal $BB1_2 # branch |
| 52 | ; lcb: $BB1_1: # %if.then |
| 53 | |
| 54 | attributes #0 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" } |
| 55 | attributes #1 = { nounwind } |
| 56 | |
| 57 | |
Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 58 | !1 = !{i32 65} |
| 59 | !2 = !{i32 167} |