• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2;RUN: llc < %s | FileCheck %s
3
4; This test case failed on legalization of "shl" node. PR29058.
5
6target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
7target triple = "x86_64-unknown-linux-gnu"
8
9@structMember = external local_unnamed_addr global i64, align 8
10
11; Function Attrs: norecurse nounwind uwtable
12define i32 @_Z3foov() local_unnamed_addr #0 {
13; CHECK-LABEL: _Z3foov:
14; CHECK:       # %bb.0: # %entry
15; CHECK-NEXT:    movq %rax, {{.*}}(%rip)
16; CHECK-NEXT:    retq
17entry:
18  %bool_1 = icmp ne i8 undef, 0
19  %bool_2 = icmp eq i8 undef, 0
20  %0 = select i1 %bool_2, i32 2147483646, i32 undef
21  %or_1 = select i1 %bool_1, i32 undef, i32 -1
22  %shl_1 = shl i32 %0, %or_1
23  %conv = zext i32 %shl_1 to i64
24  store i64 %conv, i64* @structMember, align 8
25  %tmp = select i1 %bool_2, i32 2147483646, i32 undef
26  %lnot = icmp eq i8 undef, 0
27  %or_2 = select i1 %lnot, i32 -1, i32 undef
28  %shl_2 = shl i32 %tmp, %or_2
29  ret i32 %shl_2
30}
31
32attributes #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" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
33
34