1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -o - -O0 < %s | FileCheck %s
3 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
4 target triple = "x86_64-unknown-linux-gnu"
6 define void @test1(i32 %x) #0 {
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@PLT
15 ; CHECK-NEXT: popq %rax
18 %tobool = icmp ne i32 %x, 0
19 call void @callee1(i1 zeroext %tobool)
23 define void @test2(i32 %x) #0 {
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@PLT
33 ; CHECK-NEXT: popq %rax
36 %tobool = icmp ne i32 %x, 0
37 call void @callee2(i1 signext %tobool)
41 declare void @callee1(i1 zeroext)
42 declare void @callee2(i1 signext)
44 attributes #0 = { nounwind "target-cpu"="skylake-avx512" }