• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -show-mc-encoding < %s | FileCheck %s
2
3; Test that the direct object emission selects the and variant with 8 bit
4; immediate.
5; We used to get this wrong when using direct object emission, but not when
6; reading assembly.
7
8
9target triple = "x86_64-pc-linux"
10
11define void @f1() {
12; CHECK-LABEL: f1:
13; CHECK: andq    $-32, %rsp              # encoding: [0x48,0x83,0xe4,0xe0]
14  %foo = alloca i8, align 32
15  ret void
16}
17
18define void @f2(i16 %x, i1 *%y) {
19; CHECK-LABEL: f2:
20; CHECK: andl	$1, %edi                # encoding: [0x83,0xe7,0x01]
21  %c = trunc i16 %x to i1
22  store i1 %c, i1* %y
23  ret void
24}
25
26define void @f3(i32 %x, i1 *%y) {
27; CHECK-LABEL: f3:
28; CHECK: andl	$1, %edi                # encoding: [0x83,0xe7,0x01]
29  %c = trunc i32 %x to i1
30  store i1 %c, i1* %y
31  ret void
32}
33