xref: /llvm-project/llvm/test/CodeGen/X86/fast-isel-load-i1.ll (revision 2f448bf509432c1a19ec46ab8cbc7353c03c6280)
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc < %s -fast-isel -mtriple=x86_64-unknown-linux-gnu -mattr=+avx512f  | FileCheck %s
3
4define i1 @test_i1(ptr %b) {
5; CHECK-LABEL: test_i1:
6; CHECK:       # %bb.0: # %entry
7; CHECK-NEXT:    testb $1, (%rdi)
8; CHECK-NEXT:    je .LBB0_2
9; CHECK-NEXT:  # %bb.1: # %in
10; CHECK-NEXT:    xorl %eax, %eax
11; CHECK-NEXT:    retq
12; CHECK-NEXT:  .LBB0_2: # %out
13; CHECK-NEXT:    movb $1, %al
14; CHECK-NEXT:    retq
15entry:
16  %0 = load i1, ptr %b, align 1
17  br i1 %0, label %in, label %out
18in:
19  ret i1 0
20out:
21  ret i1 1
22}
23
24