• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc -o - -O0 < %s | FileCheck %s
3target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
4target triple = "x86_64-unknown-linux-gnu"
5
6define void @test1(i32 %x) #0 {
7; CHECK-LABEL: test1:
8; CHECK:       # %bb.0: # %entry
9; CHECK-NEXT:    pushq %rax
10; CHECK-NEXT:    cmpl $0, %edi
11; CHECK-NEXT:    setne %al
12; CHECK-NEXT:    movzbl %al, %edi
13; CHECK-NEXT:    andl $1, %edi
14; CHECK-NEXT:    callq callee1
15; CHECK-NEXT:    popq %rax
16; CHECK-NEXT:    retq
17entry:
18  %tobool = icmp ne i32 %x, 0
19  call void @callee1(i1 zeroext %tobool)
20  ret void
21}
22
23define void @test2(i32 %x) #0 {
24; CHECK-LABEL: test2:
25; CHECK:       # %bb.0: # %entry
26; CHECK-NEXT:    pushq %rax
27; CHECK-NEXT:    cmpl $0, %edi
28; CHECK-NEXT:    setne %al
29; CHECK-NEXT:    movzbl %al, %edi
30; CHECK-NEXT:    andl $1, %edi
31; CHECK-NEXT:    negl %edi
32; CHECK-NEXT:    callq callee2
33; CHECK-NEXT:    popq %rax
34; CHECK-NEXT:    retq
35entry:
36  %tobool = icmp ne i32 %x, 0
37  call void @callee2(i1 signext %tobool)
38  ret void
39}
40
41declare void @callee1(i1 zeroext)
42declare void @callee2(i1 signext)
43
44attributes #0 = { nounwind "target-cpu"="skylake-avx512" }
45