Krzysztof Parzyszek | c5a4e26 | 2016-04-28 20:33:33 +0000 | [diff] [blame] | 1 | ; RUN: llc -march=hexagon < %s |
| 2 | ; REQUIRES: asserts |
| 3 | |
| 4 | target datalayout = "e-m:e-p:32:32:32-i64:64:64-i32:32:32-i16:16:16-i1:8:8-f64:64:64-f32:32:32-v64:64:64-v32:32:32-a:0-n16:32" |
| 5 | target triple = "hexagon" |
| 6 | |
| 7 | @x = common global i32* null, align 4 |
| 8 | |
| 9 | ; Function Attrs: nounwind |
| 10 | define i32 @inotify_init() #0 { |
| 11 | entry: |
| 12 | %0 = tail call i32 asm sideeffect "trap0(#1);\0A", "={r0},{r6},~{memory}"(i32 1043) #1, !srcloc !1 |
| 13 | %cmp = icmp sgt i32 %0, -4096 |
| 14 | br i1 %cmp, label %if.then, label %if.end |
| 15 | |
| 16 | if.then: ; preds = %entry |
| 17 | %sub = sub nsw i32 0, %0 |
| 18 | %1 = load i32*, i32** @x, align 4, !tbaa !2 |
| 19 | store i32 %sub, i32* %1, align 4, !tbaa !6 |
| 20 | br label %if.end |
| 21 | |
| 22 | if.end: ; preds = %if.then, %entry |
| 23 | %retval1.0 = phi i32 [ -1, %if.then ], [ %0, %entry ] |
| 24 | ret i32 %retval1.0 |
| 25 | } |
| 26 | |
Sumanth Gundapaneni | e1983bc | 2017-10-18 18:07:07 +0000 | [diff] [blame] | 27 | attributes #0 = { nounwind "disable-tail-calls"="false" "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" "target-cpu"="hexagonv60" "target-features"="+hvx,+hvx-length64b" "unsafe-fp-math"="false" "use-soft-float"="false" } |
Krzysztof Parzyszek | c5a4e26 | 2016-04-28 20:33:33 +0000 | [diff] [blame] | 28 | attributes #1 = { nounwind } |
| 29 | |
| 30 | !1 = !{i32 155} |
| 31 | !2 = !{!3, !3, i64 0} |
| 32 | !3 = !{!"any pointer", !4, i64 0} |
| 33 | !4 = !{!"omnipotent char", !5, i64 0} |
| 34 | !5 = !{!"Simple C/C++ TBAA"} |
| 35 | !6 = !{!7, !7, i64 0} |
| 36 | !7 = !{!"long", !4, i64 0} |