summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/GlobalISel/and-scalar.ll
blob: b1932142108778b9405baca794323716f3baeff0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -mtriple=x86_64-linux-gnu -global-isel -verify-machineinstrs < %s -o - | FileCheck %s --check-prefix=ALL

define i8 @test_and_i8(i8 %arg1, i8 %arg2) {
; ALL-LABEL: test_and_i8:
; ALL:       # BB#0:
; ALL-NEXT:    andb %dil, %sil
; ALL-NEXT:    movl %esi, %eax
; ALL-NEXT:    retq
  %ret = and i8 %arg1, %arg2
  ret i8 %ret
}

define i16 @test_and_i16(i16 %arg1, i16 %arg2) {
; ALL-LABEL: test_and_i16:
; ALL:       # BB#0:
; ALL-NEXT:    andw %di, %si
; ALL-NEXT:    movl %esi, %eax
; ALL-NEXT:    retq
  %ret = and i16 %arg1, %arg2
  ret i16 %ret
}

define i32 @test_and_i32(i32 %arg1, i32 %arg2) {
; ALL-LABEL: test_and_i32:
; ALL:       # BB#0:
; ALL-NEXT:    andl %edi, %esi
; ALL-NEXT:    movl %esi, %eax
; ALL-NEXT:    retq
  %ret = and i32 %arg1, %arg2
  ret i32 %ret
}

define i64 @test_and_i64(i64 %arg1, i64 %arg2) {
; ALL-LABEL: test_and_i64:
; ALL:       # BB#0:
; ALL-NEXT:    andq %rdi, %rsi
; ALL-NEXT:    movq %rsi, %rax
; ALL-NEXT:    retq
  %ret = and i64 %arg1, %arg2
  ret i64 %ret
}

OpenPOWER on IntegriCloud