Jatin Bhateja | 356e3e2 | 2017-09-17 18:16:26 +0000 | [diff] [blame] | 1 | ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py |
| 2 | ; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu | FileCheck %s |
| 3 | |
| 4 | target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" |
| 5 | target triple = "x86_64-unknown-linux-gnu" |
| 6 | |
| 7 | @b = common local_unnamed_addr global i64 0, align 8 |
| 8 | @a = common local_unnamed_addr global i8 0, align 1 |
| 9 | |
| 10 | ; Function Attrs: norecurse nounwind uwtable |
| 11 | define void @c() local_unnamed_addr #0 { |
| 12 | ; CHECK-LABEL: c: |
Francis Visoiu Mistrih | 25528d6 | 2017-12-04 17:18:51 +0000 | [diff] [blame] | 13 | ; CHECK: # %bb.0: # %entry |
Jatin Bhateja | 356e3e2 | 2017-09-17 18:16:26 +0000 | [diff] [blame] | 14 | ; CHECK-NEXT: movq {{.*}}(%rip), %rax |
| 15 | ; CHECK-NEXT: leaq (%rax,%rax,4), %rcx |
| 16 | ; CHECK-NEXT: negq %rcx |
Hans Wennborg | 2a6c9ad | 2017-10-04 17:54:06 +0000 | [diff] [blame] | 17 | ; CHECK-NEXT: leaq (%rax,%rax,8), %rax |
Jatin Bhateja | 356e3e2 | 2017-09-17 18:16:26 +0000 | [diff] [blame] | 18 | ; CHECK-NEXT: leaq (%rax,%rax,4), %rax |
| 19 | ; CHECK-NEXT: testq %rax, %rcx |
| 20 | ; CHECK-NEXT: je .LBB0_2 |
Francis Visoiu Mistrih | 25528d6 | 2017-12-04 17:18:51 +0000 | [diff] [blame] | 21 | ; CHECK-NEXT: # %bb.1: # %if.then |
Jatin Bhateja | 356e3e2 | 2017-09-17 18:16:26 +0000 | [diff] [blame] | 22 | ; CHECK-NEXT: movb $0, {{.*}}(%rip) |
| 23 | ; CHECK-NEXT: .LBB0_2: # %if.end |
| 24 | ; CHECK-NEXT: retq |
| 25 | entry: |
| 26 | %0 = load i64, i64* @b, align 8, !tbaa !2 |
| 27 | %mul = mul nsw i64 %0, -5 |
| 28 | %mul1 = mul nsw i64 %0, 45 |
| 29 | %and = and i64 %mul, %mul1 |
| 30 | %tobool = icmp eq i64 %and, 0 |
| 31 | br i1 %tobool, label %if.end, label %if.then |
| 32 | |
| 33 | if.then: ; preds = %entry |
| 34 | store i8 0, i8* @a, align 1, !tbaa !6 |
| 35 | br label %if.end |
| 36 | |
| 37 | if.end: ; preds = %entry, %if.then |
| 38 | ret void |
| 39 | } |
| 40 | |
| 41 | attributes #0 = { norecurse nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" } |
| 42 | |
| 43 | !llvm.module.flags = !{!0} |
| 44 | !llvm.ident = !{!1} |
| 45 | |
| 46 | !0 = !{i32 1, !"wchar_size", i32 4} |
| 47 | !1 = !{!"clang version 6.0.0 "} |
| 48 | !2 = !{!3, !3, i64 0} |
| 49 | !3 = !{!"long", !4, i64 0} |
| 50 | !4 = !{!"omnipotent char", !5, i64 0} |
| 51 | !5 = !{!"Simple C/C++ TBAA"} |
| 52 | !6 = !{!4, !4, i64 0} |