1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=x86_64-linux-gnu -global-isel -verify-machineinstrs < %s -o - | FileCheck %s --check-prefix=ALL
4 define i32 @test_and_i1(i32 %arg1, i32 %arg2) {
5 ; ALL-LABEL: test_and_i1:
7 ; ALL-NEXT: cmpl %esi, %edi
9 ; ALL-NEXT: andb %al, %al
10 ; ALL-NEXT: movzbl %al, %eax
11 ; ALL-NEXT: andl $1, %eax
13 %c = icmp eq i32 %arg1, %arg2
15 %ret = zext i1 %x to i32
19 define i8 @test_and_i8(i8 %arg1, i8 %arg2) {
20 ; ALL-LABEL: test_and_i8:
22 ; ALL-NEXT: movl %esi, %eax
23 ; ALL-NEXT: andb %dil, %al
24 ; ALL-NEXT: # kill: def $al killed $al killed $eax
26 %ret = and i8 %arg1, %arg2
30 define i16 @test_and_i16(i16 %arg1, i16 %arg2) {
31 ; ALL-LABEL: test_and_i16:
33 ; ALL-NEXT: movl %esi, %eax
34 ; ALL-NEXT: andw %di, %ax
35 ; ALL-NEXT: # kill: def $ax killed $ax killed $eax
37 %ret = and i16 %arg1, %arg2
41 define i32 @test_and_i32(i32 %arg1, i32 %arg2) {
42 ; ALL-LABEL: test_and_i32:
44 ; ALL-NEXT: movl %esi, %eax
45 ; ALL-NEXT: andl %edi, %eax
47 %ret = and i32 %arg1, %arg2
51 define i64 @test_and_i64(i64 %arg1, i64 %arg2) {
52 ; ALL-LABEL: test_and_i64:
54 ; ALL-NEXT: movq %rsi, %rax
55 ; ALL-NEXT: andq %rdi, %rax
57 %ret = and i64 %arg1, %arg2