summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/test/CodeGen/X86/GlobalISel/add-scalar.ll18
-rw-r--r--llvm/test/CodeGen/X86/GlobalISel/and-scalar.ll80
-rw-r--r--llvm/test/CodeGen/X86/GlobalISel/ashr-scalar.ll324
-rw-r--r--llvm/test/CodeGen/X86/GlobalISel/binop.ll36
-rw-r--r--llvm/test/CodeGen/X86/GlobalISel/callingconv.ll60
-rw-r--r--llvm/test/CodeGen/X86/GlobalISel/ext-x86-64.ll72
-rw-r--r--llvm/test/CodeGen/X86/GlobalISel/ext.ll104
-rw-r--r--llvm/test/CodeGen/X86/GlobalISel/lshr-scalar.ll320
-rw-r--r--llvm/test/CodeGen/X86/GlobalISel/memop-scalar.ll118
-rw-r--r--llvm/test/CodeGen/X86/GlobalISel/mul-scalar.ll64
-rw-r--r--llvm/test/CodeGen/X86/GlobalISel/or-scalar.ll80
-rw-r--r--llvm/test/CodeGen/X86/GlobalISel/phi.ll132
-rw-r--r--llvm/test/CodeGen/X86/GlobalISel/ptrtoint.ll64
-rw-r--r--llvm/test/CodeGen/X86/GlobalISel/shl-scalar-widening.ll96
-rw-r--r--llvm/test/CodeGen/X86/GlobalISel/shl-scalar.ll316
-rw-r--r--llvm/test/CodeGen/X86/GlobalISel/sub-scalar.ll80
-rw-r--r--llvm/test/CodeGen/X86/GlobalISel/trunc.ll102
-rw-r--r--llvm/test/CodeGen/X86/GlobalISel/undef.ll18
-rw-r--r--llvm/test/CodeGen/X86/GlobalISel/xor-scalar.ll80
19 files changed, 1082 insertions, 1082 deletions
diff --git a/llvm/test/CodeGen/X86/GlobalISel/add-scalar.ll b/llvm/test/CodeGen/X86/GlobalISel/add-scalar.ll
index 811243bd546..62cc06bd8b5 100644
--- a/llvm/test/CodeGen/X86/GlobalISel/add-scalar.ll
+++ b/llvm/test/CodeGen/X86/GlobalISel/add-scalar.ll
@@ -54,15 +54,15 @@ define i16 @test_add_i16(i16 %arg1, i16 %arg2) {
ret i16 %ret
}
-define i8 @test_add_i8(i8 %arg1, i8 %arg2) {
-; X64-LABEL: test_add_i8:
-; X64: # %bb.0:
-; X64-NEXT: movl %esi, %eax
-; X64-NEXT: addb %dil, %al
-; X64-NEXT: # kill: def $al killed $al killed $eax
-; X64-NEXT: retq
-;
-; X32-LABEL: test_add_i8:
+define i8 @test_add_i8(i8 %arg1, i8 %arg2) {
+; X64-LABEL: test_add_i8:
+; X64: # %bb.0:
+; X64-NEXT: movl %esi, %eax
+; X64-NEXT: addb %dil, %al
+; X64-NEXT: # kill: def $al killed $al killed $eax
+; X64-NEXT: retq
+;
+; X32-LABEL: test_add_i8:
; X32: # %bb.0:
; X32-NEXT: movb {{[0-9]+}}(%esp), %al
; X32-NEXT: addb {{[0-9]+}}(%esp), %al
diff --git a/llvm/test/CodeGen/X86/GlobalISel/and-scalar.ll b/llvm/test/CodeGen/X86/GlobalISel/and-scalar.ll
index a5bebfff3a7..88a7563612e 100644
--- a/llvm/test/CodeGen/X86/GlobalISel/and-scalar.ll
+++ b/llvm/test/CodeGen/X86/GlobalISel/and-scalar.ll
@@ -16,45 +16,45 @@ define i32 @test_and_i1(i32 %arg1, i32 %arg2) {
ret i32 %ret
}
-define i8 @test_and_i8(i8 %arg1, i8 %arg2) {
-; ALL-LABEL: test_and_i8:
-; ALL: # %bb.0:
-; ALL-NEXT: movl %esi, %eax
-; ALL-NEXT: andb %dil, %al
-; ALL-NEXT: # kill: def $al killed $al killed $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: movl %esi, %eax
-; ALL-NEXT: andw %di, %ax
-; ALL-NEXT: # kill: def $ax killed $ax killed $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: movl %esi, %eax
-; ALL-NEXT: andl %edi, %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: movq %rsi, %rax
-; ALL-NEXT: andq %rdi, %rax
-; ALL-NEXT: retq
- %ret = and i64 %arg1, %arg2
- ret i64 %ret
+define i8 @test_and_i8(i8 %arg1, i8 %arg2) {
+; ALL-LABEL: test_and_i8:
+; ALL: # %bb.0:
+; ALL-NEXT: movl %esi, %eax
+; ALL-NEXT: andb %dil, %al
+; ALL-NEXT: # kill: def $al killed $al killed $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: movl %esi, %eax
+; ALL-NEXT: andw %di, %ax
+; ALL-NEXT: # kill: def $ax killed $ax killed $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: movl %esi, %eax
+; ALL-NEXT: andl %edi, %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: movq %rsi, %rax
+; ALL-NEXT: andq %rdi, %rax
+; ALL-NEXT: retq
+ %ret = and i64 %arg1, %arg2
+ ret i64 %ret
}
diff --git a/llvm/test/CodeGen/X86/GlobalISel/ashr-scalar.ll b/llvm/test/CodeGen/X86/GlobalISel/ashr-scalar.ll
index 0959553efb9..df63071c4ee 100644
--- a/llvm/test/CodeGen/X86/GlobalISel/ashr-scalar.ll
+++ b/llvm/test/CodeGen/X86/GlobalISel/ashr-scalar.ll
@@ -1,191 +1,191 @@
; 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=X64
-define i64 @test_ashr_i64(i64 %arg1, i64 %arg2) {
-; X64-LABEL: test_ashr_i64:
-; X64: # %bb.0:
-; X64-NEXT: movq %rdi, %rax
-; X64-NEXT: movq %rsi, %rcx
-; X64-NEXT: # kill: def $cl killed $rcx
-; X64-NEXT: sarq %cl, %rax
-; X64-NEXT: retq
- %res = ashr i64 %arg1, %arg2
- ret i64 %res
-}
-
-define i64 @test_ashr_i64_imm(i64 %arg1) {
-; X64-LABEL: test_ashr_i64_imm:
-; X64: # %bb.0:
-; X64-NEXT: movq %rdi, %rax
-; X64-NEXT: movq $5, %rcx
-; X64-NEXT: # kill: def $cl killed $rcx
-; X64-NEXT: sarq %cl, %rax
-; X64-NEXT: retq
- %res = ashr i64 %arg1, 5
- ret i64 %res
-}
-
-define i64 @test_ashr_i64_imm1(i64 %arg1) {
-; X64-LABEL: test_ashr_i64_imm1:
-; X64: # %bb.0:
-; X64-NEXT: movq %rdi, %rax
-; X64-NEXT: movq $1, %rcx
-; X64-NEXT: # kill: def $cl killed $rcx
-; X64-NEXT: sarq %cl, %rax
-; X64-NEXT: retq
- %res = ashr i64 %arg1, 1
- ret i64 %res
-}
-
-define i32 @test_ashr_i32(i32 %arg1, i32 %arg2) {
-; X64-LABEL: test_ashr_i32:
-; X64: # %bb.0:
-; X64-NEXT: movl %edi, %eax
-; X64-NEXT: movl %esi, %ecx
-; X64-NEXT: # kill: def $cl killed $ecx
-; X64-NEXT: sarl %cl, %eax
-; X64-NEXT: retq
- %res = ashr i32 %arg1, %arg2
- ret i32 %res
-}
-
-define i32 @test_ashr_i32_imm(i32 %arg1) {
-; X64-LABEL: test_ashr_i32_imm:
-; X64: # %bb.0:
-; X64-NEXT: movl %edi, %eax
-; X64-NEXT: movl $5, %ecx
-; X64-NEXT: # kill: def $cl killed $ecx
-; X64-NEXT: sarl %cl, %eax
-; X64-NEXT: retq
- %res = ashr i32 %arg1, 5
- ret i32 %res
-}
-
-define i32 @test_ashr_i32_imm1(i32 %arg1) {
-; X64-LABEL: test_ashr_i32_imm1:
-; X64: # %bb.0:
-; X64-NEXT: movl %edi, %eax
-; X64-NEXT: movl $1, %ecx
-; X64-NEXT: # kill: def $cl killed $ecx
-; X64-NEXT: sarl %cl, %eax
-; X64-NEXT: retq
- %res = ashr i32 %arg1, 1
- ret i32 %res
-}
-
-define i16 @test_ashr_i16(i32 %arg1, i32 %arg2) {
-; X64-LABEL: test_ashr_i16:
-; X64: # %bb.0:
-; X64-NEXT: movl %edi, %eax
-; X64-NEXT: movl %esi, %ecx
-; X64-NEXT: # kill: def $cx killed $cx killed $ecx
-; X64-NEXT: # kill: def $cl killed $cx
-; X64-NEXT: sarw %cl, %ax
-; X64-NEXT: # kill: def $ax killed $ax killed $eax
-; X64-NEXT: retq
- %a = trunc i32 %arg1 to i16
- %a2 = trunc i32 %arg2 to i16
+define i64 @test_ashr_i64(i64 %arg1, i64 %arg2) {
+; X64-LABEL: test_ashr_i64:
+; X64: # %bb.0:
+; X64-NEXT: movq %rdi, %rax
+; X64-NEXT: movq %rsi, %rcx
+; X64-NEXT: # kill: def $cl killed $rcx
+; X64-NEXT: sarq %cl, %rax
+; X64-NEXT: retq
+ %res = ashr i64 %arg1, %arg2
+ ret i64 %res
+}
+
+define i64 @test_ashr_i64_imm(i64 %arg1) {
+; X64-LABEL: test_ashr_i64_imm:
+; X64: # %bb.0:
+; X64-NEXT: movq %rdi, %rax
+; X64-NEXT: movq $5, %rcx
+; X64-NEXT: # kill: def $cl killed $rcx
+; X64-NEXT: sarq %cl, %rax
+; X64-NEXT: retq
+ %res = ashr i64 %arg1, 5
+ ret i64 %res
+}
+
+define i64 @test_ashr_i64_imm1(i64 %arg1) {
+; X64-LABEL: test_ashr_i64_imm1:
+; X64: # %bb.0:
+; X64-NEXT: movq %rdi, %rax
+; X64-NEXT: movq $1, %rcx
+; X64-NEXT: # kill: def $cl killed $rcx
+; X64-NEXT: sarq %cl, %rax
+; X64-NEXT: retq
+ %res = ashr i64 %arg1, 1
+ ret i64 %res
+}
+
+define i32 @test_ashr_i32(i32 %arg1, i32 %arg2) {
+; X64-LABEL: test_ashr_i32:
+; X64: # %bb.0:
+; X64-NEXT: movl %edi, %eax
+; X64-NEXT: movl %esi, %ecx
+; X64-NEXT: # kill: def $cl killed $ecx
+; X64-NEXT: sarl %cl, %eax
+; X64-NEXT: retq
+ %res = ashr i32 %arg1, %arg2
+ ret i32 %res
+}
+
+define i32 @test_ashr_i32_imm(i32 %arg1) {
+; X64-LABEL: test_ashr_i32_imm:
+; X64: # %bb.0:
+; X64-NEXT: movl %edi, %eax
+; X64-NEXT: movl $5, %ecx
+; X64-NEXT: # kill: def $cl killed $ecx
+; X64-NEXT: sarl %cl, %eax
+; X64-NEXT: retq
+ %res = ashr i32 %arg1, 5
+ ret i32 %res
+}
+
+define i32 @test_ashr_i32_imm1(i32 %arg1) {
+; X64-LABEL: test_ashr_i32_imm1:
+; X64: # %bb.0:
+; X64-NEXT: movl %edi, %eax
+; X64-NEXT: movl $1, %ecx
+; X64-NEXT: # kill: def $cl killed $ecx
+; X64-NEXT: sarl %cl, %eax
+; X64-NEXT: retq
+ %res = ashr i32 %arg1, 1
+ ret i32 %res
+}
+
+define i16 @test_ashr_i16(i32 %arg1, i32 %arg2) {
+; X64-LABEL: test_ashr_i16:
+; X64: # %bb.0:
+; X64-NEXT: movl %edi, %eax
+; X64-NEXT: movl %esi, %ecx
+; X64-NEXT: # kill: def $cx killed $cx killed $ecx
+; X64-NEXT: # kill: def $cl killed $cx
+; X64-NEXT: sarw %cl, %ax
+; X64-NEXT: # kill: def $ax killed $ax killed $eax
+; X64-NEXT: retq
+ %a = trunc i32 %arg1 to i16
+ %a2 = trunc i32 %arg2 to i16
%res = ashr i16 %a, %a2
ret i16 %res
}
-define i16 @test_ashr_i16_imm(i32 %arg1) {
-; X64-LABEL: test_ashr_i16_imm:
-; X64: # %bb.0:
-; X64-NEXT: movl %edi, %eax
-; X64-NEXT: movw $5, %cx
-; X64-NEXT: # kill: def $cl killed $cx
-; X64-NEXT: sarw %cl, %ax
-; X64-NEXT: # kill: def $ax killed $ax killed $eax
-; X64-NEXT: retq
- %a = trunc i32 %arg1 to i16
- %res = ashr i16 %a, 5
+define i16 @test_ashr_i16_imm(i32 %arg1) {
+; X64-LABEL: test_ashr_i16_imm:
+; X64: # %bb.0:
+; X64-NEXT: movl %edi, %eax
+; X64-NEXT: movw $5, %cx
+; X64-NEXT: # kill: def $cl killed $cx
+; X64-NEXT: sarw %cl, %ax
+; X64-NEXT: # kill: def $ax killed $ax killed $eax
+; X64-NEXT: retq
+ %a = trunc i32 %arg1 to i16
+ %res = ashr i16 %a, 5
ret i16 %res
}
-define i16 @test_ashr_i16_imm1(i32 %arg1) {
-; X64-LABEL: test_ashr_i16_imm1:
-; X64: # %bb.0:
-; X64-NEXT: movl %edi, %eax
-; X64-NEXT: movw $1, %cx
-; X64-NEXT: # kill: def $cl killed $cx
-; X64-NEXT: sarw %cl, %ax
-; X64-NEXT: # kill: def $ax killed $ax killed $eax
-; X64-NEXT: retq
- %a = trunc i32 %arg1 to i16
- %res = ashr i16 %a, 1
+define i16 @test_ashr_i16_imm1(i32 %arg1) {
+; X64-LABEL: test_ashr_i16_imm1:
+; X64: # %bb.0:
+; X64-NEXT: movl %edi, %eax
+; X64-NEXT: movw $1, %cx
+; X64-NEXT: # kill: def $cl killed $cx
+; X64-NEXT: sarw %cl, %ax
+; X64-NEXT: # kill: def $ax killed $ax killed $eax
+; X64-NEXT: retq
+ %a = trunc i32 %arg1 to i16
+ %res = ashr i16 %a, 1
ret i16 %res
}
-define i8 @test_ashr_i8(i32 %arg1, i32 %arg2) {
-; X64-LABEL: test_ashr_i8:
-; X64: # %bb.0:
-; X64-NEXT: movl %edi, %eax
-; X64-NEXT: movl %esi, %ecx
-; X64-NEXT: # kill: def $cl killed $cl killed $ecx
-; X64-NEXT: sarb %cl, %al
-; X64-NEXT: # kill: def $al killed $al killed $eax
-; X64-NEXT: retq
- %a = trunc i32 %arg1 to i8
- %a2 = trunc i32 %arg2 to i8
+define i8 @test_ashr_i8(i32 %arg1, i32 %arg2) {
+; X64-LABEL: test_ashr_i8:
+; X64: # %bb.0:
+; X64-NEXT: movl %edi, %eax
+; X64-NEXT: movl %esi, %ecx
+; X64-NEXT: # kill: def $cl killed $cl killed $ecx
+; X64-NEXT: sarb %cl, %al
+; X64-NEXT: # kill: def $al killed $al killed $eax
+; X64-NEXT: retq
+ %a = trunc i32 %arg1 to i8
+ %a2 = trunc i32 %arg2 to i8
%res = ashr i8 %a, %a2
ret i8 %res
}
-define i8 @test_ashr_i8_imm(i32 %arg1) {
-; X64-LABEL: test_ashr_i8_imm:
-; X64: # %bb.0:
-; X64-NEXT: movl %edi, %eax
-; X64-NEXT: sarb $5, %al
-; X64-NEXT: # kill: def $al killed $al killed $eax
-; X64-NEXT: retq
- %a = trunc i32 %arg1 to i8
- %res = ashr i8 %a, 5
+define i8 @test_ashr_i8_imm(i32 %arg1) {
+; X64-LABEL: test_ashr_i8_imm:
+; X64: # %bb.0:
+; X64-NEXT: movl %edi, %eax
+; X64-NEXT: sarb $5, %al
+; X64-NEXT: # kill: def $al killed $al killed $eax
+; X64-NEXT: retq
+ %a = trunc i32 %arg1 to i8
+ %res = ashr i8 %a, 5
ret i8 %res
}
-define i8 @test_ashr_i8_imm1(i32 %arg1) {
-; X64-LABEL: test_ashr_i8_imm1:
-; X64: # %bb.0:
-; X64-NEXT: movl %edi, %eax
-; X64-NEXT: sarb %al
-; X64-NEXT: # kill: def $al killed $al killed $eax
-; X64-NEXT: retq
- %a = trunc i32 %arg1 to i8
- %res = ashr i8 %a, 1
+define i8 @test_ashr_i8_imm1(i32 %arg1) {
+; X64-LABEL: test_ashr_i8_imm1:
+; X64: # %bb.0:
+; X64-NEXT: movl %edi, %eax
+; X64-NEXT: sarb %al
+; X64-NEXT: # kill: def $al killed $al killed $eax
+; X64-NEXT: retq
+ %a = trunc i32 %arg1 to i8
+ %res = ashr i8 %a, 1
ret i8 %res
}
-define i1 @test_ashr_i1(i32 %arg1, i32 %arg2) {
-; X64-LABEL: test_ashr_i1:
-; X64: # %bb.0:
-; X64-NEXT: movl %edi, %eax
-; X64-NEXT: movl %esi, %ecx
-; X64-NEXT: shlb $7, %al
-; X64-NEXT: sarb $7, %al
-; X64-NEXT: andb $1, %cl
-; X64-NEXT: # kill: def $cl killed $cl killed $ecx
-; X64-NEXT: sarb %cl, %al
-; X64-NEXT: # kill: def $al killed $al killed $eax
-; X64-NEXT: retq
- %a = trunc i32 %arg1 to i1
- %a2 = trunc i32 %arg2 to i1
+define i1 @test_ashr_i1(i32 %arg1, i32 %arg2) {
+; X64-LABEL: test_ashr_i1:
+; X64: # %bb.0:
+; X64-NEXT: movl %edi, %eax
+; X64-NEXT: movl %esi, %ecx
+; X64-NEXT: shlb $7, %al
+; X64-NEXT: sarb $7, %al
+; X64-NEXT: andb $1, %cl
+; X64-NEXT: # kill: def $cl killed $cl killed $ecx
+; X64-NEXT: sarb %cl, %al
+; X64-NEXT: # kill: def $al killed $al killed $eax
+; X64-NEXT: retq
+ %a = trunc i32 %arg1 to i1
+ %a2 = trunc i32 %arg2 to i1
%res = ashr i1 %a, %a2
ret i1 %res
}
-define i1 @test_ashr_i1_imm1(i32 %arg1) {
-; X64-LABEL: test_ashr_i1_imm1:
-; X64: # %bb.0:
-; X64-NEXT: movl %edi, %eax
-; X64-NEXT: movb $-1, %cl
-; X64-NEXT: shlb $7, %al
-; X64-NEXT: sarb $7, %al
-; X64-NEXT: andb $1, %cl
-; X64-NEXT: sarb %cl, %al
-; X64-NEXT: # kill: def $al killed $al killed $eax
-; X64-NEXT: retq
- %a = trunc i32 %arg1 to i1
- %res = ashr i1 %a, 1
+define i1 @test_ashr_i1_imm1(i32 %arg1) {
+; X64-LABEL: test_ashr_i1_imm1:
+; X64: # %bb.0:
+; X64-NEXT: movl %edi, %eax
+; X64-NEXT: movb $-1, %cl
+; X64-NEXT: shlb $7, %al
+; X64-NEXT: sarb $7, %al
+; X64-NEXT: andb $1, %cl
+; X64-NEXT: sarb %cl, %al
+; X64-NEXT: # kill: def $al killed $al killed $eax
+; X64-NEXT: retq
+ %a = trunc i32 %arg1 to i1
+ %res = ashr i1 %a, 1
ret i1 %res
}
diff --git a/llvm/test/CodeGen/X86/GlobalISel/binop.ll b/llvm/test/CodeGen/X86/GlobalISel/binop.ll
index dbb150c4cbb..d06b758048e 100644
--- a/llvm/test/CodeGen/X86/GlobalISel/binop.ll
+++ b/llvm/test/CodeGen/X86/GlobalISel/binop.ll
@@ -4,24 +4,24 @@
; RUN: llc -mtriple=x86_64-linux-gnu -mattr=+avx512f -global-isel -verify-machineinstrs < %s -o - | FileCheck %s --check-prefix=ALL --check-prefix=ALL_AVX --check-prefix=AVX512F
; RUN: llc -mtriple=x86_64-linux-gnu -mattr=+avx512f -mattr=+avx512vl -global-isel -verify-machineinstrs < %s -o - | FileCheck %s --check-prefix=ALL --check-prefix=ALL_AVX --check-prefix=AVX512VL
-define i64 @test_sub_i64(i64 %arg1, i64 %arg2) {
-; ALL-LABEL: test_sub_i64:
-; ALL: # %bb.0:
-; ALL-NEXT: movq %rdi, %rax
-; ALL-NEXT: subq %rsi, %rax
-; ALL-NEXT: retq
- %ret = sub i64 %arg1, %arg2
- ret i64 %ret
-}
-
-define i32 @test_sub_i32(i32 %arg1, i32 %arg2) {
-; ALL-LABEL: test_sub_i32:
-; ALL: # %bb.0:
-; ALL-NEXT: movl %edi, %eax
-; ALL-NEXT: subl %esi, %eax
-; ALL-NEXT: retq
- %ret = sub i32 %arg1, %arg2
- ret i32 %ret
+define i64 @test_sub_i64(i64 %arg1, i64 %arg2) {
+; ALL-LABEL: test_sub_i64:
+; ALL: # %bb.0:
+; ALL-NEXT: movq %rdi, %rax
+; ALL-NEXT: subq %rsi, %rax
+; ALL-NEXT: retq
+ %ret = sub i64 %arg1, %arg2
+ ret i64 %ret
+}
+
+define i32 @test_sub_i32(i32 %arg1, i32 %arg2) {
+; ALL-LABEL: test_sub_i32:
+; ALL: # %bb.0:
+; ALL-NEXT: movl %edi, %eax
+; ALL-NEXT: subl %esi, %eax
+; ALL-NEXT: retq
+ %ret = sub i32 %arg1, %arg2
+ ret i32 %ret
}
define float @test_add_float(float %arg1, float %arg2) {
diff --git a/llvm/test/CodeGen/X86/GlobalISel/callingconv.ll b/llvm/test/CodeGen/X86/GlobalISel/callingconv.ll
index e3f9a4e5cfe..1fe4318b746 100644
--- a/llvm/test/CodeGen/X86/GlobalISel/callingconv.ll
+++ b/llvm/test/CodeGen/X86/GlobalISel/callingconv.ll
@@ -35,13 +35,13 @@ define i8 @test_arg_i8(i8 %a) {
; X32-NEXT: movb {{[0-9]+}}(%esp), %al
; X32-NEXT: retl
;
-; X64-LABEL: test_arg_i8:
-; X64: # %bb.0:
-; X64-NEXT: movl %edi, %eax
-; X64-NEXT: # kill: def $al killed $al killed $eax
-; X64-NEXT: retq
- ret i8 %a
-}
+; X64-LABEL: test_arg_i8:
+; X64: # %bb.0:
+; X64-NEXT: movl %edi, %eax
+; X64-NEXT: # kill: def $al killed $al killed $eax
+; X64-NEXT: retq
+ ret i8 %a
+}
define i16 @test_arg_i16(i16 %a) {
; X32-LABEL: test_arg_i16:
@@ -49,13 +49,13 @@ define i16 @test_arg_i16(i16 %a) {
; X32-NEXT: movzwl {{[0-9]+}}(%esp), %eax
; X32-NEXT: retl
;
-; X64-LABEL: test_arg_i16:
-; X64: # %bb.0:
-; X64-NEXT: movl %edi, %eax
-; X64-NEXT: # kill: def $ax killed $ax killed $eax
-; X64-NEXT: retq
- ret i16 %a
-}
+; X64-LABEL: test_arg_i16:
+; X64: # %bb.0:
+; X64-NEXT: movl %edi, %eax
+; X64-NEXT: # kill: def $ax killed $ax killed $eax
+; X64-NEXT: retq
+ ret i16 %a
+}
define i32 @test_arg_i32(i32 %a) {
; X32-LABEL: test_arg_i32:
@@ -113,14 +113,14 @@ define <4 x i32> @test_v4i32_args(<4 x i32> %arg1, <4 x i32> %arg2) {
define <8 x i32> @test_v8i32_args(<8 x i32> %arg1, <8 x i32> %arg2) {
; X32-LABEL: test_v8i32_args:
-; X32: # %bb.0:
-; X32-NEXT: subl $12, %esp
-; X32-NEXT: .cfi_def_cfa_offset 16
-; X32-NEXT: movaps %xmm2, %xmm0
-; X32-NEXT: movups {{[0-9]+}}(%esp), %xmm1
-; X32-NEXT: addl $12, %esp
-; X32-NEXT: .cfi_def_cfa_offset 4
-; X32-NEXT: retl
+; X32: # %bb.0:
+; X32-NEXT: subl $12, %esp
+; X32-NEXT: .cfi_def_cfa_offset 16
+; X32-NEXT: movaps %xmm2, %xmm0
+; X32-NEXT: movups {{[0-9]+}}(%esp), %xmm1
+; X32-NEXT: addl $12, %esp
+; X32-NEXT: .cfi_def_cfa_offset 4
+; X32-NEXT: retl
;
; X64-LABEL: test_v8i32_args:
; X64: # %bb.0:
@@ -256,14 +256,14 @@ define <8 x i32> @test_split_return_callee(<8 x i32> %arg1, <8 x i32> %arg2) {
; X32-LABEL: test_split_return_callee:
; X32: # %bb.0:
; X32-NEXT: subl $44, %esp
-; X32-NEXT: .cfi_def_cfa_offset 48
-; X32-NEXT: movaps %xmm0, (%esp) # 16-byte Spill
-; X32-NEXT: movaps %xmm1, {{[0-9]+}}(%esp) # 16-byte Spill
-; X32-NEXT: movdqa %xmm2, %xmm0
-; X32-NEXT: movdqu {{[0-9]+}}(%esp), %xmm1
-; X32-NEXT: calll split_return_callee
-; X32-NEXT: paddd (%esp), %xmm0 # 16-byte Folded Reload
-; X32-NEXT: paddd {{[0-9]+}}(%esp), %xmm1 # 16-byte Folded Reload
+; X32-NEXT: .cfi_def_cfa_offset 48
+; X32-NEXT: movaps %xmm0, (%esp) # 16-byte Spill
+; X32-NEXT: movaps %xmm1, {{[0-9]+}}(%esp) # 16-byte Spill
+; X32-NEXT: movdqa %xmm2, %xmm0
+; X32-NEXT: movdqu {{[0-9]+}}(%esp), %xmm1
+; X32-NEXT: calll split_return_callee
+; X32-NEXT: paddd (%esp), %xmm0 # 16-byte Folded Reload
+; X32-NEXT: paddd {{[0-9]+}}(%esp), %xmm1 # 16-byte Folded Reload
; X32-NEXT: addl $44, %esp
; X32-NEXT: .cfi_def_cfa_offset 4
; X32-NEXT: retl
diff --git a/llvm/test/CodeGen/X86/GlobalISel/ext-x86-64.ll b/llvm/test/CodeGen/X86/GlobalISel/ext-x86-64.ll
index c3409558f62..a9cdcbeb566 100644
--- a/llvm/test/CodeGen/X86/GlobalISel/ext-x86-64.ll
+++ b/llvm/test/CodeGen/X86/GlobalISel/ext-x86-64.ll
@@ -3,45 +3,45 @@
; TODO merge with ext.ll after i64 sext supported on 32bit platform
-define i64 @test_zext_i1(i8 %a) {
-; X64-LABEL: test_zext_i1:
-; X64: # %bb.0:
-; X64-NEXT: movl %edi, %eax
-; X64-NEXT: andq $1, %rax
-; X64-NEXT: retq
- %val = trunc i8 %a to i1
- %r = zext i1 %val to i64
+define i64 @test_zext_i1(i8 %a) {
+; X64-LABEL: test_zext_i1:
+; X64: # %bb.0:
+; X64-NEXT: movl %edi, %eax
+; X64-NEXT: andq $1, %rax
+; X64-NEXT: retq
+ %val = trunc i8 %a to i1
+ %r = zext i1 %val to i64
ret i64 %r
}
-define i64 @test_sext_i8(i8 %val) {
-; X64-LABEL: test_sext_i8:
-; X64: # %bb.0:
-; X64-NEXT: movl %edi, %eax
-; X64-NEXT: movq $56, %rcx
-; X64-NEXT: # kill: def $cl killed $rcx
-; X64-NEXT: shlq %cl, %rax
-; X64-NEXT: movq $56, %rcx
-; X64-NEXT: # kill: def $cl killed $rcx
-; X64-NEXT: sarq %cl, %rax
-; X64-NEXT: retq
- %r = sext i8 %val to i64
- ret i64 %r
-}
-
-define i64 @test_sext_i16(i16 %val) {
-; X64-LABEL: test_sext_i16:
-; X64: # %bb.0:
-; X64-NEXT: movl %edi, %eax
-; X64-NEXT: movq $48, %rcx
-; X64-NEXT: # kill: def $cl killed $rcx
-; X64-NEXT: shlq %cl, %rax
-; X64-NEXT: movq $48, %rcx
-; X64-NEXT: # kill: def $cl killed $rcx
-; X64-NEXT: sarq %cl, %rax
-; X64-NEXT: retq
- %r = sext i16 %val to i64
- ret i64 %r
+define i64 @test_sext_i8(i8 %val) {
+; X64-LABEL: test_sext_i8:
+; X64: # %bb.0:
+; X64-NEXT: movl %edi, %eax
+; X64-NEXT: movq $56, %rcx
+; X64-NEXT: # kill: def $cl killed $rcx
+; X64-NEXT: shlq %cl, %rax
+; X64-NEXT: movq $56, %rcx
+; X64-NEXT: # kill: def $cl killed $rcx
+; X64-NEXT: sarq %cl, %rax
+; X64-NEXT: retq
+ %r = sext i8 %val to i64
+ ret i64 %r
+}
+
+define i64 @test_sext_i16(i16 %val) {
+; X64-LABEL: test_sext_i16:
+; X64: # %bb.0:
+; X64-NEXT: movl %edi, %eax
+; X64-NEXT: movq $48, %rcx
+; X64-NEXT: # kill: def $cl killed $rcx
+; X64-NEXT: shlq %cl, %rax
+; X64-NEXT: movq $48, %rcx
+; X64-NEXT: # kill: def $cl killed $rcx
+; X64-NEXT: sarq %cl, %rax
+; X64-NEXT: retq
+ %r = sext i16 %val to i64
+ ret i64 %r
}
; TODO enable after selection supported
diff --git a/llvm/test/CodeGen/X86/GlobalISel/ext.ll b/llvm/test/CodeGen/X86/GlobalISel/ext.ll
index 5ece4e2bf41..eaed4309b12 100644
--- a/llvm/test/CodeGen/X86/GlobalISel/ext.ll
+++ b/llvm/test/CodeGen/X86/GlobalISel/ext.ll
@@ -2,15 +2,15 @@
; RUN: llc -mtriple=x86_64-linux-gnu -global-isel -verify-machineinstrs < %s -o - | FileCheck %s --check-prefix=X64
; RUN: llc -mtriple=i386-linux-gnu -global-isel -verify-machineinstrs < %s -o - | FileCheck %s --check-prefix=X32
-define i8 @test_zext_i1toi8(i32 %a) {
-; X64-LABEL: test_zext_i1toi8:
-; X64: # %bb.0:
-; X64-NEXT: movl %edi, %eax
-; X64-NEXT: andb $1, %al
-; X64-NEXT: # kill: def $al killed $al killed $eax
-; X64-NEXT: retq
-;
-; X32-LABEL: test_zext_i1toi8:
+define i8 @test_zext_i1toi8(i32 %a) {
+; X64-LABEL: test_zext_i1toi8:
+; X64: # %bb.0:
+; X64-NEXT: movl %edi, %eax
+; X64-NEXT: andb $1, %al
+; X64-NEXT: # kill: def $al killed $al killed $eax
+; X64-NEXT: retq
+;
+; X32-LABEL: test_zext_i1toi8:
; X32: # %bb.0:
; X32-NEXT: movl {{[0-9]+}}(%esp), %eax
; X32-NEXT: andb $1, %al
@@ -21,15 +21,15 @@ define i8 @test_zext_i1toi8(i32 %a) {
ret i8 %r
}
-define i16 @test_zext_i1toi16(i32 %a) {
-; X64-LABEL: test_zext_i1toi16:
-; X64: # %bb.0:
-; X64-NEXT: movl %edi, %eax
-; X64-NEXT: andw $1, %ax
-; X64-NEXT: # kill: def $ax killed $ax killed $eax
-; X64-NEXT: retq
-;
-; X32-LABEL: test_zext_i1toi16:
+define i16 @test_zext_i1toi16(i32 %a) {
+; X64-LABEL: test_zext_i1toi16:
+; X64: # %bb.0:
+; X64-NEXT: movl %edi, %eax
+; X64-NEXT: andw $1, %ax
+; X64-NEXT: # kill: def $ax killed $ax killed $eax
+; X64-NEXT: retq
+;
+; X32-LABEL: test_zext_i1toi16:
; X32: # %bb.0:
; X32-NEXT: movl {{[0-9]+}}(%esp), %eax
; X32-NEXT: andw $1, %ax
@@ -40,14 +40,14 @@ define i16 @test_zext_i1toi16(i32 %a) {
ret i16 %r
}
-define i32 @test_zext_i1(i32 %a) {
-; X64-LABEL: test_zext_i1:
-; X64: # %bb.0:
-; X64-NEXT: movl %edi, %eax
-; X64-NEXT: andl $1, %eax
-; X64-NEXT: retq
-;
-; X32-LABEL: test_zext_i1:
+define i32 @test_zext_i1(i32 %a) {
+; X64-LABEL: test_zext_i1:
+; X64: # %bb.0:
+; X64-NEXT: movl %edi, %eax
+; X64-NEXT: andl $1, %eax
+; X64-NEXT: retq
+;
+; X32-LABEL: test_zext_i1:
; X32: # %bb.0:
; X32-NEXT: movl {{[0-9]+}}(%esp), %eax
; X32-NEXT: andl $1, %eax
@@ -85,19 +85,19 @@ define i32 @test_zext_i16(i16 %val) {
ret i32 %r
}
-define i32 @test_sext_i8(i8 %val) {
-; X64-LABEL: test_sext_i8:
-; X64: # %bb.0:
-; X64-NEXT: movl %edi, %eax
-; X64-NEXT: movl $24, %ecx
-; X64-NEXT: # kill: def $cl killed $ecx
-; X64-NEXT: shll %cl, %eax
-; X64-NEXT: movl $24, %ecx
-; X64-NEXT: # kill: def $cl killed $ecx
-; X64-NEXT: sarl %cl, %eax
-; X64-NEXT: retq
-;
-; X32-LABEL: test_sext_i8:
+define i32 @test_sext_i8(i8 %val) {
+; X64-LABEL: test_sext_i8:
+; X64: # %bb.0:
+; X64-NEXT: movl %edi, %eax
+; X64-NEXT: movl $24, %ecx
+; X64-NEXT: # kill: def $cl killed $ecx
+; X64-NEXT: shll %cl, %eax
+; X64-NEXT: movl $24, %ecx
+; X64-NEXT: # kill: def $cl killed $ecx
+; X64-NEXT: sarl %cl, %eax
+; X64-NEXT: retq
+;
+; X32-LABEL: test_sext_i8:
; X32: # %bb.0:
; X32-NEXT: movsbl {{[0-9]+}}(%esp), %eax
; X32-NEXT: retl
@@ -105,19 +105,19 @@ define i32 @test_sext_i8(i8 %val) {
ret i32 %r
}
-define i32 @test_sext_i16(i16 %val) {
-; X64-LABEL: test_sext_i16:
-; X64: # %bb.0:
-; X64-NEXT: movl %edi, %eax
-; X64-NEXT: movl $16, %ecx
-; X64-NEXT: # kill: def $cl killed $ecx
-; X64-NEXT: shll %cl, %eax
-; X64-NEXT: movl $16, %ecx
-; X64-NEXT: # kill: def $cl killed $ecx
-; X64-NEXT: sarl %cl, %eax
-; X64-NEXT: retq
-;
-; X32-LABEL: test_sext_i16:
+define i32 @test_sext_i16(i16 %val) {
+; X64-LABEL: test_sext_i16:
+; X64: # %bb.0:
+; X64-NEXT: movl %edi, %eax
+; X64-NEXT: movl $16, %ecx
+; X64-NEXT: # kill: def $cl killed $ecx
+; X64-NEXT: shll %cl, %eax
+; X64-NEXT: movl $16, %ecx
+; X64-NEXT: # kill: def $cl killed $ecx
+; X64-NEXT: sarl %cl, %eax
+; X64-NEXT: retq
+;
+; X32-LABEL: test_sext_i16:
; X32: # %bb.0:
; X32-NEXT: movswl {{[0-9]+}}(%esp), %eax
; X32-NEXT: retl
diff --git a/llvm/test/CodeGen/X86/GlobalISel/lshr-scalar.ll b/llvm/test/CodeGen/X86/GlobalISel/lshr-scalar.ll
index 11633fb6f10..f159248f4b1 100644
--- a/llvm/test/CodeGen/X86/GlobalISel/lshr-scalar.ll
+++ b/llvm/test/CodeGen/X86/GlobalISel/lshr-scalar.ll
@@ -1,189 +1,189 @@
; 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=X64
-define i64 @test_lshr_i64(i64 %arg1, i64 %arg2) {
-; X64-LABEL: test_lshr_i64:
-; X64: # %bb.0:
-; X64-NEXT: movq %rdi, %rax
-; X64-NEXT: movq %rsi, %rcx
-; X64-NEXT: # kill: def $cl killed $rcx
-; X64-NEXT: shrq %cl, %rax
-; X64-NEXT: retq
- %res = lshr i64 %arg1, %arg2
- ret i64 %res
-}
-
-define i64 @test_lshr_i64_imm(i64 %arg1) {
-; X64-LABEL: test_lshr_i64_imm:
-; X64: # %bb.0:
-; X64-NEXT: movq %rdi, %rax
-; X64-NEXT: movq $5, %rcx
-; X64-NEXT: # kill: def $cl killed $rcx
-; X64-NEXT: shrq %cl, %rax
-; X64-NEXT: retq
- %res = lshr i64 %arg1, 5
- ret i64 %res
-}
-
-define i64 @test_lshr_i64_imm1(i64 %arg1) {
-; X64-LABEL: test_lshr_i64_imm1:
-; X64: # %bb.0:
-; X64-NEXT: movq %rdi, %rax
-; X64-NEXT: movq $1, %rcx
-; X64-NEXT: # kill: def $cl killed $rcx
-; X64-NEXT: shrq %cl, %rax
-; X64-NEXT: retq
- %res = lshr i64 %arg1, 1
- ret i64 %res
-}
-
-define i32 @test_lshr_i32(i32 %arg1, i32 %arg2) {
-; X64-LABEL: test_lshr_i32:
-; X64: # %bb.0:
-; X64-NEXT: movl %edi, %eax
-; X64-NEXT: movl %esi, %ecx
-; X64-NEXT: # kill: def $cl killed $ecx
-; X64-NEXT: shrl %cl, %eax
-; X64-NEXT: retq
- %res = lshr i32 %arg1, %arg2
- ret i32 %res
-}
-
-define i32 @test_lshr_i32_imm(i32 %arg1) {
-; X64-LABEL: test_lshr_i32_imm:
-; X64: # %bb.0:
-; X64-NEXT: movl %edi, %eax
-; X64-NEXT: movl $5, %ecx
-; X64-NEXT: # kill: def $cl killed $ecx
-; X64-NEXT: shrl %cl, %eax
-; X64-NEXT: retq
- %res = lshr i32 %arg1, 5
- ret i32 %res
-}
-
-define i32 @test_lshr_i32_imm1(i32 %arg1) {
-; X64-LABEL: test_lshr_i32_imm1:
-; X64: # %bb.0:
-; X64-NEXT: movl %edi, %eax
-; X64-NEXT: movl $1, %ecx
-; X64-NEXT: # kill: def $cl killed $ecx
-; X64-NEXT: shrl %cl, %eax
-; X64-NEXT: retq
- %res = lshr i32 %arg1, 1
- ret i32 %res
-}
-
-define i16 @test_lshr_i16(i32 %arg1, i32 %arg2) {
-; X64-LABEL: test_lshr_i16:
-; X64: # %bb.0:
-; X64-NEXT: movl %edi, %eax
-; X64-NEXT: movl %esi, %ecx
-; X64-NEXT: # kill: def $cx killed $cx killed $ecx
-; X64-NEXT: # kill: def $cl killed $cx
-; X64-NEXT: shrw %cl, %ax
-; X64-NEXT: # kill: def $ax killed $ax killed $eax
-; X64-NEXT: retq
- %a = trunc i32 %arg1 to i16
- %a2 = trunc i32 %arg2 to i16
+define i64 @test_lshr_i64(i64 %arg1, i64 %arg2) {
+; X64-LABEL: test_lshr_i64:
+; X64: # %bb.0:
+; X64-NEXT: movq %rdi, %rax
+; X64-NEXT: movq %rsi, %rcx
+; X64-NEXT: # kill: def $cl killed $rcx
+; X64-NEXT: shrq %cl, %rax
+; X64-NEXT: retq
+ %res = lshr i64 %arg1, %arg2
+ ret i64 %res
+}
+
+define i64 @test_lshr_i64_imm(i64 %arg1) {
+; X64-LABEL: test_lshr_i64_imm:
+; X64: # %bb.0:
+; X64-NEXT: movq %rdi, %rax
+; X64-NEXT: movq $5, %rcx
+; X64-NEXT: # kill: def $cl killed $rcx
+; X64-NEXT: shrq %cl, %rax
+; X64-NEXT: retq
+ %res = lshr i64 %arg1, 5
+ ret i64 %res
+}
+
+define i64 @test_lshr_i64_imm1(i64 %arg1) {
+; X64-LABEL: test_lshr_i64_imm1:
+; X64: # %bb.0:
+; X64-NEXT: movq %rdi, %rax
+; X64-NEXT: movq $1, %rcx
+; X64-NEXT: # kill: def $cl killed $rcx
+; X64-NEXT: shrq %cl, %rax
+; X64-NEXT: retq
+ %res = lshr i64 %arg1, 1
+ ret i64 %res
+}
+
+define i32 @test_lshr_i32(i32 %arg1, i32 %arg2) {
+; X64-LABEL: test_lshr_i32:
+; X64: # %bb.0:
+; X64-NEXT: movl %edi, %eax
+; X64-NEXT: movl %esi, %ecx
+; X64-NEXT: # kill: def $cl killed $ecx
+; X64-NEXT: shrl %cl, %eax
+; X64-NEXT: retq
+ %res = lshr i32 %arg1, %arg2
+ ret i32 %res
+}
+
+define i32 @test_lshr_i32_imm(i32 %arg1) {
+; X64-LABEL: test_lshr_i32_imm:
+; X64: # %bb.0:
+; X64-NEXT: movl %edi, %eax
+; X64-NEXT: movl $5, %ecx
+; X64-NEXT: # kill: def $cl killed $ecx
+; X64-NEXT: shrl %cl, %eax
+; X64-NEXT: retq
+ %res = lshr i32 %arg1, 5
+ ret i32 %res
+}
+
+define i32 @test_lshr_i32_imm1(i32 %arg1) {
+; X64-LABEL: test_lshr_i32_imm1:
+; X64: # %bb.0:
+; X64-NEXT: movl %edi, %eax
+; X64-NEXT: movl $1, %ecx
+; X64-NEXT: # kill: def $cl killed $ecx
+; X64-NEXT: shrl %cl, %eax
+; X64-NEXT: retq
+ %res = lshr i32 %arg1, 1
+ ret i32 %res
+}
+
+define i16 @test_lshr_i16(i32 %arg1, i32 %arg2) {
+; X64-LABEL: test_lshr_i16:
+; X64: # %bb.0:
+; X64-NEXT: movl %edi, %eax
+; X64-NEXT: movl %esi, %ecx
+; X64-NEXT: # kill: def $cx killed $cx killed $ecx
+; X64-NEXT: # kill: def $cl killed $cx
+; X64-NEXT: shrw %cl, %ax
+; X64-NEXT: # kill: def $ax killed $ax killed $eax
+; X64-NEXT: retq
+ %a = trunc i32 %arg1 to i16
+ %a2 = trunc i32 %arg2 to i16
%res = lshr i16 %a, %a2
ret i16 %res
}
-define i16 @test_lshr_i16_imm(i32 %arg1) {
-; X64-LABEL: test_lshr_i16_imm:
-; X64: # %bb.0:
-; X64-NEXT: movl %edi, %eax
-; X64-NEXT: movw $5, %cx
-; X64-NEXT: # kill: def $cl killed $cx
-; X64-NEXT: shrw %cl, %ax
-; X64-NEXT: # kill: def $ax killed $ax killed $eax
-; X64-NEXT: retq
- %a = trunc i32 %arg1 to i16
- %res = lshr i16 %a, 5
+define i16 @test_lshr_i16_imm(i32 %arg1) {
+; X64-LABEL: test_lshr_i16_imm:
+; X64: # %bb.0:
+; X64-NEXT: movl %edi, %eax
+; X64-NEXT: movw $5, %cx
+; X64-NEXT: # kill: def $cl killed $cx
+; X64-NEXT: shrw %cl, %ax
+; X64-NEXT: # kill: def $ax killed $ax killed $eax
+; X64-NEXT: retq
+ %a = trunc i32 %arg1 to i16
+ %res = lshr i16 %a, 5
ret i16 %res
}
-define i16 @test_lshr_i16_imm1(i32 %arg1) {
-; X64-LABEL: test_lshr_i16_imm1:
-; X64: # %bb.0:
-; X64-NEXT: movl %edi, %eax
-; X64-NEXT: movw $1, %cx
-; X64-NEXT: # kill: def $cl killed $cx
-; X64-NEXT: shrw %cl, %ax
-; X64-NEXT: # kill: def $ax killed $ax killed $eax
-; X64-NEXT: retq
- %a = trunc i32 %arg1 to i16
- %res = lshr i16 %a, 1
+define i16 @test_lshr_i16_imm1(i32 %arg1) {
+; X64-LABEL: test_lshr_i16_imm1:
+; X64: # %bb.0:
+; X64-NEXT: movl %edi, %eax
+; X64-NEXT: movw $1, %cx
+; X64-NEXT: # kill: def $cl killed $cx
+; X64-NEXT: shrw %cl, %ax
+; X64-NEXT: # kill: def $ax killed $ax killed $eax
+; X64-NEXT: retq
+ %a = trunc i32 %arg1 to i16
+ %res = lshr i16 %a, 1
ret i16 %res
}
-define i8 @test_lshr_i8(i32 %arg1, i32 %arg2) {
-; X64-LABEL: test_lshr_i8:
-; X64: # %bb.0:
-; X64-NEXT: movl %edi, %eax
-; X64-NEXT: movl %esi, %ecx
-; X64-NEXT: # kill: def $cl killed $cl killed $ecx
-; X64-NEXT: shrb %cl, %al
-; X64-NEXT: # kill: def $al killed $al killed $eax
-; X64-NEXT: retq
- %a = trunc i32 %arg1 to i8
- %a2 = trunc i32 %arg2 to i8
+define i8 @test_lshr_i8(i32 %arg1, i32 %arg2) {
+; X64-LABEL: test_lshr_i8:
+; X64: # %bb.0:
+; X64-NEXT: movl %edi, %eax
+; X64-NEXT: movl %esi, %ecx
+; X64-NEXT: # kill: def $cl killed $cl killed $ecx
+; X64-NEXT: shrb %cl, %al
+; X64-NEXT: # kill: def $al killed $al killed $eax
+; X64-NEXT: retq
+ %a = trunc i32 %arg1 to i8
+ %a2 = trunc i32 %arg2 to i8
%res = lshr i8 %a, %a2
ret i8 %res
}
-define i8 @test_lshr_i8_imm(i32 %arg1) {
-; X64-LABEL: test_lshr_i8_imm:
-; X64: # %bb.0:
-; X64-NEXT: movl %edi, %eax
-; X64-NEXT: shrb $5, %al
-; X64-NEXT: # kill: def $al killed $al killed $eax
-; X64-NEXT: retq
- %a = trunc i32 %arg1 to i8
- %res = lshr i8 %a, 5
+define i8 @test_lshr_i8_imm(i32 %arg1) {
+; X64-LABEL: test_lshr_i8_imm:
+; X64: # %bb.0:
+; X64-NEXT: movl %edi, %eax
+; X64-NEXT: shrb $5, %al
+; X64-NEXT: # kill: def $al killed $al killed $eax
+; X64-NEXT: retq
+ %a = trunc i32 %arg1 to i8
+ %res = lshr i8 %a, 5
ret i8 %res
}
-define i8 @test_lshr_i8_imm1(i32 %arg1) {
-; X64-LABEL: test_lshr_i8_imm1:
-; X64: # %bb.0:
-; X64-NEXT: movl %edi, %eax
-; X64-NEXT: shrb %al
-; X64-NEXT: # kill: def $al killed $al killed $eax
-; X64-NEXT: retq
- %a = trunc i32 %arg1 to i8
- %res = lshr i8 %a, 1
+define i8 @test_lshr_i8_imm1(i32 %arg1) {
+; X64-LABEL: test_lshr_i8_imm1:
+; X64: # %bb.0:
+; X64-NEXT: movl %edi, %eax
+; X64-NEXT: shrb %al
+; X64-NEXT: # kill: def $al killed $al killed $eax
+; X64-NEXT: retq
+ %a = trunc i32 %arg1 to i8
+ %res = lshr i8 %a, 1
ret i8 %res
}
-define i1 @test_lshr_i1(i32 %arg1, i32 %arg2) {
-; X64-LABEL: test_lshr_i1:
-; X64: # %bb.0:
-; X64-NEXT: movl %edi, %eax
-; X64-NEXT: movl %esi, %ecx
-; X64-NEXT: andb $1, %al
-; X64-NEXT: andb $1, %cl
-; X64-NEXT: # kill: def $cl killed $cl killed $ecx
-; X64-NEXT: shrb %cl, %al
-; X64-NEXT: # kill: def $al killed $al killed $eax
-; X64-NEXT: retq
- %a = trunc i32 %arg1 to i1
- %a2 = trunc i32 %arg2 to i1
+define i1 @test_lshr_i1(i32 %arg1, i32 %arg2) {
+; X64-LABEL: test_lshr_i1:
+; X64: # %bb.0:
+; X64-NEXT: movl %edi, %eax
+; X64-NEXT: movl %esi, %ecx
+; X64-NEXT: andb $1, %al
+; X64-NEXT: andb $1, %cl
+; X64-NEXT: # kill: def $cl killed $cl killed $ecx
+; X64-NEXT: shrb %cl, %al
+; X64-NEXT: # kill: def $al killed $al killed $eax
+; X64-NEXT: retq
+ %a = trunc i32 %arg1 to i1
+ %a2 = trunc i32 %arg2 to i1
%res = lshr i1 %a, %a2
ret i1 %res
}
-define i1 @test_lshr_i1_imm1(i32 %arg1) {
-; X64-LABEL: test_lshr_i1_imm1:
-; X64: # %bb.0:
-; X64-NEXT: movl %edi, %eax
-; X64-NEXT: movb $-1, %cl
-; X64-NEXT: andb $1, %al
-; X64-NEXT: andb $1, %cl
-; X64-NEXT: shrb %cl, %al
-; X64-NEXT: # kill: def $al killed $al killed $eax
-; X64-NEXT: retq
- %a = trunc i32 %arg1 to i1
- %res = lshr i1 %a, 1
+define i1 @test_lshr_i1_imm1(i32 %arg1) {
+; X64-LABEL: test_lshr_i1_imm1:
+; X64: # %bb.0:
+; X64-NEXT: movl %edi, %eax
+; X64-NEXT: movb $-1, %cl
+; X64-NEXT: andb $1, %al
+; X64-NEXT: andb $1, %cl
+; X64-NEXT: shrb %cl, %al
+; X64-NEXT: # kill: def $al killed $al killed $eax
+; X64-NEXT: retq
+ %a = trunc i32 %arg1 to i1
+ %res = lshr i1 %a, 1
ret i1 %res
}
diff --git a/llvm/test/CodeGen/X86/GlobalISel/memop-scalar.ll b/llvm/test/CodeGen/X86/GlobalISel/memop-scalar.ll
index 6b94febe5a6..089263359ce 100644
--- a/llvm/test/CodeGen/X86/GlobalISel/memop-scalar.ll
+++ b/llvm/test/CodeGen/X86/GlobalISel/memop-scalar.ll
@@ -79,71 +79,71 @@ define double @test_load_double(double * %p1) {
ret double %r
}
-define i1 * @test_store_i1(i1 %val, i1 * %p1) {
-; ALL-LABEL: test_store_i1:
-; ALL: # %bb.0:
-; ALL-NEXT: movq %rsi, %rax
-; ALL-NEXT: andb $1, %dil
-; ALL-NEXT: movb %dil, (%rsi)
-; ALL-NEXT: retq
- store i1 %val, i1* %p1
- ret i1 * %p1;
-}
-
-define i32 * @test_store_i32(i32 %val, i32 * %p1) {
-; ALL-LABEL: test_store_i32:
-; ALL: # %bb.0:
-; ALL-NEXT: movq %rsi, %rax
-; ALL-NEXT: movl %edi, (%rsi)
-; ALL-NEXT: retq
- store i32 %val, i32* %p1
- ret i32 * %p1;
-}
-
-define i64 * @test_store_i64(i64 %val, i64 * %p1) {
-; ALL-LABEL: test_store_i64:
-; ALL: # %bb.0:
-; ALL-NEXT: movq %rsi, %rax
-; ALL-NEXT: movq %rdi, (%rsi)
-; ALL-NEXT: retq
- store i64 %val, i64* %p1
- ret i64 * %p1;
+define i1 * @test_store_i1(i1 %val, i1 * %p1) {
+; ALL-LABEL: test_store_i1:
+; ALL: # %bb.0:
+; ALL-NEXT: movq %rsi, %rax
+; ALL-NEXT: andb $1, %dil
+; ALL-NEXT: movb %dil, (%rsi)
+; ALL-NEXT: retq
+ store i1 %val, i1* %p1
+ ret i1 * %p1;
+}
+
+define i32 * @test_store_i32(i32 %val, i32 * %p1) {
+; ALL-LABEL: test_store_i32:
+; ALL: # %bb.0:
+; ALL-NEXT: movq %rsi, %rax
+; ALL-NEXT: movl %edi, (%rsi)
+; ALL-NEXT: retq
+ store i32 %val, i32* %p1
+ ret i32 * %p1;
+}
+
+define i64 * @test_store_i64(i64 %val, i64 * %p1) {
+; ALL-LABEL: test_store_i64:
+; ALL: # %bb.0:
+; ALL-NEXT: movq %rsi, %rax
+; ALL-NEXT: movq %rdi, (%rsi)
+; ALL-NEXT: retq
+ store i64 %val, i64* %p1
+ ret i64 * %p1;
}
define float * @test_store_float(float %val, float * %p1) {
-;
-; SSE_FAST-LABEL: test_store_float:
-; SSE_FAST: # %bb.0:
-; SSE_FAST-NEXT: movq %rdi, %rax
-; SSE_FAST-NEXT: movd %xmm0, %ecx
-; SSE_FAST-NEXT: movl %ecx, (%rdi)
-; SSE_FAST-NEXT: retq
-;
-; SSE_GREEDY-LABEL: test_store_float:
-; SSE_GREEDY: # %bb.0:
-; SSE_GREEDY-NEXT: movq %rdi, %rax
-; SSE_GREEDY-NEXT: movss %xmm0, (%rdi)
-; SSE_GREEDY-NEXT: retq
- store float %val, float* %p1
- ret float * %p1;
+;
+; SSE_FAST-LABEL: test_store_float:
+; SSE_FAST: # %bb.0:
+; SSE_FAST-NEXT: movq %rdi, %rax
+; SSE_FAST-NEXT: movd %xmm0, %ecx
+; SSE_FAST-NEXT: movl %ecx, (%rdi)
+; SSE_FAST-NEXT: retq
+;
+; SSE_GREEDY-LABEL: test_store_float:
+; SSE_GREEDY: # %bb.0:
+; SSE_GREEDY-NEXT: movq %rdi, %rax
+; SSE_GREEDY-NEXT: movss %xmm0, (%rdi)
+; SSE_GREEDY-NEXT: retq
+ store float %val, float* %p1
+ ret float * %p1;
}
define double * @test_store_double(double %val, double * %p1) {
-;
-; SSE_FAST-LABEL: test_store_double:
-; SSE_FAST: # %bb.0:
-; SSE_FAST-NEXT: movq %rdi, %rax
-; SSE_FAST-NEXT: movq %xmm0, %rcx
-; SSE_FAST-NEXT: movq %rcx, (%rdi)
-; SSE_FAST-NEXT: retq
-;
-; SSE_GREEDY-LABEL: test_store_double:
-; SSE_GREEDY: # %bb.0:
-; SSE_GREEDY-NEXT: movq %rdi, %rax
-; SSE_GREEDY-NEXT: movsd %xmm0, (%rdi)
-; SSE_GREEDY-NEXT: retq
- store double %val, double* %p1
- ret double * %p1;
+;
+; SSE_FAST-LABEL: test_store_double:
+; SSE_FAST: # %bb.0:
+; SSE_FAST-NEXT: movq %rdi, %rax
+; SSE_FAST-NEXT: movq %xmm0, %rcx
+; SSE_FAST-NEXT: movq %rcx, (%rdi)
+; SSE_FAST-NEXT: retq
+;
+; SSE_GREEDY-LABEL: test_store_double:
+; SSE_GREEDY: # %bb.0:
+; SSE_GREEDY-NEXT: movq %rdi, %rax
+; SSE_GREEDY-NEXT: movsd %xmm0, (%rdi)
+; SSE_GREEDY-NEXT: retq
+ store double %val, double* %p1
+ ret double * %p1;
}
define i32* @test_load_ptr(i32** %ptr1) {
diff --git a/llvm/test/CodeGen/X86/GlobalISel/mul-scalar.ll b/llvm/test/CodeGen/X86/GlobalISel/mul-scalar.ll
index 897a9eceaac..ddcb63e83d1 100644
--- a/llvm/test/CodeGen/X86/GlobalISel/mul-scalar.ll
+++ b/llvm/test/CodeGen/X86/GlobalISel/mul-scalar.ll
@@ -5,36 +5,36 @@
;define i8 @test_mul_i8(i8 %arg1, i8 %arg2) {
; %ret = mul i8 %arg1, %arg2
; ret i8 %ret
-;}
-
-define i16 @test_mul_i16(i16 %arg1, i16 %arg2) {
-; ALL-LABEL: test_mul_i16:
-; ALL: # %bb.0:
-; ALL-NEXT: movl %esi, %eax
-; ALL-NEXT: imulw %di, %ax
-; ALL-NEXT: # kill: def $ax killed $ax killed $eax
-; ALL-NEXT: retq
- %ret = mul i16 %arg1, %arg2
- ret i16 %ret
-}
-
-define i32 @test_mul_i32(i32 %arg1, i32 %arg2) {
-; ALL-LABEL: test_mul_i32:
-; ALL: # %bb.0:
-; ALL-NEXT: movl %esi, %eax
-; ALL-NEXT: imull %edi, %eax
-; ALL-NEXT: retq
- %ret = mul i32 %arg1, %arg2
- ret i32 %ret
-}
-
-define i64 @test_mul_i64(i64 %arg1, i64 %arg2) {
-; ALL-LABEL: test_mul_i64:
-; ALL: # %bb.0:
-; ALL-NEXT: movq %rsi, %rax
-; ALL-NEXT: imulq %rdi, %rax
-; ALL-NEXT: retq
- %ret = mul i64 %arg1, %arg2
- ret i64 %ret
-}
+;}
+
+define i16 @test_mul_i16(i16 %arg1, i16 %arg2) {
+; ALL-LABEL: test_mul_i16:
+; ALL: # %bb.0:
+; ALL-NEXT: movl %esi, %eax
+; ALL-NEXT: imulw %di, %ax
+; ALL-NEXT: # kill: def $ax killed $ax killed $eax
+; ALL-NEXT: retq
+ %ret = mul i16 %arg1, %arg2
+ ret i16 %ret
+}
+
+define i32 @test_mul_i32(i32 %arg1, i32 %arg2) {
+; ALL-LABEL: test_mul_i32:
+; ALL: # %bb.0:
+; ALL-NEXT: movl %esi, %eax
+; ALL-NEXT: imull %edi, %eax
+; ALL-NEXT: retq
+ %ret = mul i32 %arg1, %arg2
+ ret i32 %ret
+}
+
+define i64 @test_mul_i64(i64 %arg1, i64 %arg2) {
+; ALL-LABEL: test_mul_i64:
+; ALL: # %bb.0:
+; ALL-NEXT: movq %rsi, %rax
+; ALL-NEXT: imulq %rdi, %rax
+; ALL-NEXT: retq
+ %ret = mul i64 %arg1, %arg2
+ ret i64 %ret
+}
diff --git a/llvm/test/CodeGen/X86/GlobalISel/or-scalar.ll b/llvm/test/CodeGen/X86/GlobalISel/or-scalar.ll
index 47634c8f0f2..1edb72ca9b6 100644
--- a/llvm/test/CodeGen/X86/GlobalISel/or-scalar.ll
+++ b/llvm/test/CodeGen/X86/GlobalISel/or-scalar.ll
@@ -16,45 +16,45 @@ define i32 @test_or_i1(i32 %arg1, i32 %arg2) {
ret i32 %ret
}
-define i8 @test_or_i8(i8 %arg1, i8 %arg2) {
-; ALL-LABEL: test_or_i8:
-; ALL: # %bb.0:
-; ALL-NEXT: movl %esi, %eax
-; ALL-NEXT: orb %dil, %al
-; ALL-NEXT: # kill: def $al killed $al killed $eax
-; ALL-NEXT: retq
- %ret = or i8 %arg1, %arg2
- ret i8 %ret
-}
-
-define i16 @test_or_i16(i16 %arg1, i16 %arg2) {
-; ALL-LABEL: test_or_i16:
-; ALL: # %bb.0:
-; ALL-NEXT: movl %esi, %eax
-; ALL-NEXT: orw %di, %ax
-; ALL-NEXT: # kill: def $ax killed $ax killed $eax
-; ALL-NEXT: retq
- %ret = or i16 %arg1, %arg2
- ret i16 %ret
-}
-
-define i32 @test_or_i32(i32 %arg1, i32 %arg2) {
-; ALL-LABEL: test_or_i32:
-; ALL: # %bb.0:
-; ALL-NEXT: movl %esi, %eax
-; ALL-NEXT: orl %edi, %eax
-; ALL-NEXT: retq
- %ret = or i32 %arg1, %arg2
- ret i32 %ret
-}
-
-define i64 @test_or_i64(i64 %arg1, i64 %arg2) {
-; ALL-LABEL: test_or_i64:
-; ALL: # %bb.0:
-; ALL-NEXT: movq %rsi, %rax
-; ALL-NEXT: orq %rdi, %rax
-; ALL-NEXT: retq
- %ret = or i64 %arg1, %arg2
- ret i64 %ret
+define i8 @test_or_i8(i8 %arg1, i8 %arg2) {
+; ALL-LABEL: test_or_i8:
+; ALL: # %bb.0:
+; ALL-NEXT: movl %esi, %eax
+; ALL-NEXT: orb %dil, %al
+; ALL-NEXT: # kill: def $al killed $al killed $eax
+; ALL-NEXT: retq
+ %ret = or i8 %arg1, %arg2
+ ret i8 %ret
+}
+
+define i16 @test_or_i16(i16 %arg1, i16 %arg2) {
+; ALL-LABEL: test_or_i16:
+; ALL: # %bb.0:
+; ALL-NEXT: movl %esi, %eax
+; ALL-NEXT: orw %di, %ax
+; ALL-NEXT: # kill: def $ax killed $ax killed $eax
+; ALL-NEXT: retq
+ %ret = or i16 %arg1, %arg2
+ ret i16 %ret
+}
+
+define i32 @test_or_i32(i32 %arg1, i32 %arg2) {
+; ALL-LABEL: test_or_i32:
+; ALL: # %bb.0:
+; ALL-NEXT: movl %esi, %eax
+; ALL-NEXT: orl %edi, %eax
+; ALL-NEXT: retq
+ %ret = or i32 %arg1, %arg2
+ ret i32 %ret
+}
+
+define i64 @test_or_i64(i64 %arg1, i64 %arg2) {
+; ALL-LABEL: test_or_i64:
+; ALL: # %bb.0:
+; ALL-NEXT: movq %rsi, %rax
+; ALL-NEXT: orq %rdi, %rax
+; ALL-NEXT: retq
+ %ret = or i64 %arg1, %arg2
+ ret i64 %ret
}
diff --git a/llvm/test/CodeGen/X86/GlobalISel/phi.ll b/llvm/test/CodeGen/X86/GlobalISel/phi.ll
index 11c55cedefa..28e65c73aca 100644
--- a/llvm/test/CodeGen/X86/GlobalISel/phi.ll
+++ b/llvm/test/CodeGen/X86/GlobalISel/phi.ll
@@ -1,24 +1,24 @@
; 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_i8(i32 %a, i8 %f, i8 %t) {
-; ALL-LABEL: test_i8:
-; ALL: # %bb.0: # %entry
-; ALL-NEXT: xorl %ecx, %ecx
-; ALL-NEXT: cmpl %ecx, %edi
-; ALL-NEXT: setg %cl
-; ALL-NEXT: testb $1, %cl
-; ALL-NEXT: je .LBB0_2
-; ALL-NEXT: # %bb.1:
-; ALL-NEXT: movl %esi, %eax
-; ALL-NEXT: # kill: def $al killed $al killed $eax
-; ALL-NEXT: retq
-; ALL-NEXT: .LBB0_2: # %cond.false
-; ALL-NEXT: movl %edx, %eax
-; ALL-NEXT: # kill: def $al killed $al killed $eax
-; ALL-NEXT: retq
-entry:
- %cmp = icmp sgt i32 %a, 0
+define i8 @test_i8(i32 %a, i8 %f, i8 %t) {
+; ALL-LABEL: test_i8:
+; ALL: # %bb.0: # %entry
+; ALL-NEXT: xorl %ecx, %ecx
+; ALL-NEXT: cmpl %ecx, %edi
+; ALL-NEXT: setg %cl
+; ALL-NEXT: testb $1, %cl
+; ALL-NEXT: je .LBB0_2
+; ALL-NEXT: # %bb.1:
+; ALL-NEXT: movl %esi, %eax
+; ALL-NEXT: # kill: def $al killed $al killed $eax
+; ALL-NEXT: retq
+; ALL-NEXT: .LBB0_2: # %cond.false
+; ALL-NEXT: movl %edx, %eax
+; ALL-NEXT: # kill: def $al killed $al killed $eax
+; ALL-NEXT: retq
+entry:
+ %cmp = icmp sgt i32 %a, 0
br i1 %cmp, label %cond.true, label %cond.false
cond.true: ; preds = %entry
@@ -32,24 +32,24 @@ cond.end: ; preds = %cond.false, %cond.t
ret i8 %cond
}
-define i16 @test_i16(i32 %a, i16 %f, i16 %t) {
-; ALL-LABEL: test_i16:
-; ALL: # %bb.0: # %entry
-; ALL-NEXT: xorl %ecx, %ecx
-; ALL-NEXT: cmpl %ecx, %edi
-; ALL-NEXT: setg %cl
-; ALL-NEXT: testb $1, %cl
-; ALL-NEXT: je .LBB1_2
-; ALL-NEXT: # %bb.1:
-; ALL-NEXT: movl %esi, %eax
-; ALL-NEXT: # kill: def $ax killed $ax killed $eax
-; ALL-NEXT: retq
-; ALL-NEXT: .LBB1_2: # %cond.false
-; ALL-NEXT: movl %edx, %eax
-; ALL-NEXT: # kill: def $ax killed $ax killed $eax
-; ALL-NEXT: retq
-entry:
- %cmp = icmp sgt i32 %a, 0
+define i16 @test_i16(i32 %a, i16 %f, i16 %t) {
+; ALL-LABEL: test_i16:
+; ALL: # %bb.0: # %entry
+; ALL-NEXT: xorl %ecx, %ecx
+; ALL-NEXT: cmpl %ecx, %edi
+; ALL-NEXT: setg %cl
+; ALL-NEXT: testb $1, %cl
+; ALL-NEXT: je .LBB1_2
+; ALL-NEXT: # %bb.1:
+; ALL-NEXT: movl %esi, %eax
+; ALL-NEXT: # kill: def $ax killed $ax killed $eax
+; ALL-NEXT: retq
+; ALL-NEXT: .LBB1_2: # %cond.false
+; ALL-NEXT: movl %edx, %eax
+; ALL-NEXT: # kill: def $ax killed $ax killed $eax
+; ALL-NEXT: retq
+entry:
+ %cmp = icmp sgt i32 %a, 0
br i1 %cmp, label %cond.true, label %cond.false
cond.true: ; preds = %entry
@@ -63,21 +63,21 @@ cond.end: ; preds = %cond.false, %cond.t
ret i16 %cond
}
-define i32 @test_i32(i32 %a, i32 %f, i32 %t) {
-; ALL-LABEL: test_i32:
-; ALL: # %bb.0: # %entry
-; ALL-NEXT: movl %esi, %eax
-; ALL-NEXT: xorl %ecx, %ecx
-; ALL-NEXT: cmpl %ecx, %edi
-; ALL-NEXT: setg %cl
-; ALL-NEXT: testb $1, %cl
-; ALL-NEXT: jne .LBB2_2
-; ALL-NEXT: # %bb.1: # %cond.false
-; ALL-NEXT: movl %edx, %eax
-; ALL-NEXT: .LBB2_2: # %cond.end
-; ALL-NEXT: retq
-entry:
- %cmp = icmp sgt i32 %a, 0
+define i32 @test_i32(i32 %a, i32 %f, i32 %t) {
+; ALL-LABEL: test_i32:
+; ALL: # %bb.0: # %entry
+; ALL-NEXT: movl %esi, %eax
+; ALL-NEXT: xorl %ecx, %ecx
+; ALL-NEXT: cmpl %ecx, %edi
+; ALL-NEXT: setg %cl
+; ALL-NEXT: testb $1, %cl
+; ALL-NEXT: jne .LBB2_2
+; ALL-NEXT: # %bb.1: # %cond.false
+; ALL-NEXT: movl %edx, %eax
+; ALL-NEXT: .LBB2_2: # %cond.end
+; ALL-NEXT: retq
+entry:
+ %cmp = icmp sgt i32 %a, 0
br i1 %cmp, label %cond.true, label %cond.false
cond.true: ; preds = %entry
@@ -91,21 +91,21 @@ cond.end: ; preds = %cond.false, %cond.t
ret i32 %cond
}
-define i64 @test_i64(i32 %a, i64 %f, i64 %t) {
-; ALL-LABEL: test_i64:
-; ALL: # %bb.0: # %entry
-; ALL-NEXT: movq %rsi, %rax
-; ALL-NEXT: xorl %ecx, %ecx
-; ALL-NEXT: cmpl %ecx, %edi
-; ALL-NEXT: setg %cl
-; ALL-NEXT: testb $1, %cl
-; ALL-NEXT: jne .LBB3_2
-; ALL-NEXT: # %bb.1: # %cond.false
-; ALL-NEXT: movq %rdx, %rax
-; ALL-NEXT: .LBB3_2: # %cond.end
-; ALL-NEXT: retq
-entry:
- %cmp = icmp sgt i32 %a, 0
+define i64 @test_i64(i32 %a, i64 %f, i64 %t) {
+; ALL-LABEL: test_i64:
+; ALL: # %bb.0: # %entry
+; ALL-NEXT: movq %rsi, %rax
+; ALL-NEXT: xorl %ecx, %ecx
+; ALL-NEXT: cmpl %ecx, %edi
+; ALL-NEXT: setg %cl
+; ALL-NEXT: testb $1, %cl
+; ALL-NEXT: jne .LBB3_2
+; ALL-NEXT: # %bb.1: # %cond.false
+; ALL-NEXT: movq %rdx, %rax
+; ALL-NEXT: .LBB3_2: # %cond.end
+; ALL-NEXT: retq
+entry:
+ %cmp = icmp sgt i32 %a, 0
br i1 %cmp, label %cond.true, label %cond.false
cond.true: ; preds = %entry
diff --git a/llvm/test/CodeGen/X86/GlobalISel/ptrtoint.ll b/llvm/test/CodeGen/X86/GlobalISel/ptrtoint.ll
index 4e4decbcbbb..afa4361fa4b 100644
--- a/llvm/test/CodeGen/X86/GlobalISel/ptrtoint.ll
+++ b/llvm/test/CodeGen/X86/GlobalISel/ptrtoint.ll
@@ -1,47 +1,47 @@
; 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=CHECK
-define i1 @ptrtoint_s1_p0(i64* %p) {
-; CHECK-LABEL: ptrtoint_s1_p0:
-; CHECK: # %bb.0: # %entry
-; CHECK-NEXT: movq %rdi, %rax
-; CHECK-NEXT: # kill: def $al killed $al killed $rax
-; CHECK-NEXT: retq
-entry:
- %0 = ptrtoint i64* %p to i1
+define i1 @ptrtoint_s1_p0(i64* %p) {
+; CHECK-LABEL: ptrtoint_s1_p0:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: movq %rdi, %rax
+; CHECK-NEXT: # kill: def $al killed $al killed $rax
+; CHECK-NEXT: retq
+entry:
+ %0 = ptrtoint i64* %p to i1
ret i1 %0
}
-define i8 @ptrtoint_s8_p0(i64* %p) {
-; CHECK-LABEL: ptrtoint_s8_p0:
-; CHECK: # %bb.0: # %entry
-; CHECK-NEXT: movq %rdi, %rax
-; CHECK-NEXT: # kill: def $al killed $al killed $rax
-; CHECK-NEXT: retq
-entry:
- %0 = ptrtoint i64* %p to i8
+define i8 @ptrtoint_s8_p0(i64* %p) {
+; CHECK-LABEL: ptrtoint_s8_p0:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: movq %rdi, %rax
+; CHECK-NEXT: # kill: def $al killed $al killed $rax
+; CHECK-NEXT: retq
+entry:
+ %0 = ptrtoint i64* %p to i8
ret i8 %0
}
-define i16 @ptrtoint_s16_p0(i64* %p) {
-; CHECK-LABEL: ptrtoint_s16_p0:
-; CHECK: # %bb.0: # %entry
-; CHECK-NEXT: movq %rdi, %rax
-; CHECK-NEXT: # kill: def $ax killed $ax killed $rax
-; CHECK-NEXT: retq
-entry:
- %0 = ptrtoint i64* %p to i16
+define i16 @ptrtoint_s16_p0(i64* %p) {
+; CHECK-LABEL: ptrtoint_s16_p0:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: movq %rdi, %rax
+; CHECK-NEXT: # kill: def $ax killed $ax killed $rax
+; CHECK-NEXT: retq
+entry:
+ %0 = ptrtoint i64* %p to i16
ret i16 %0
}
-define i32 @ptrtoint_s32_p0(i64* %p) {
-; CHECK-LABEL: ptrtoint_s32_p0:
-; CHECK: # %bb.0: # %entry
-; CHECK-NEXT: movq %rdi, %rax
-; CHECK-NEXT: # kill: def $eax killed $eax killed $rax
-; CHECK-NEXT: retq
-entry:
- %0 = ptrtoint i64* %p to i32
+define i32 @ptrtoint_s32_p0(i64* %p) {
+; CHECK-LABEL: ptrtoint_s32_p0:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: movq %rdi, %rax
+; CHECK-NEXT: # kill: def $eax killed $eax killed $rax
+; CHECK-NEXT: retq
+entry:
+ %0 = ptrtoint i64* %p to i32
ret i32 %0
}
diff --git a/llvm/test/CodeGen/X86/GlobalISel/shl-scalar-widening.ll b/llvm/test/CodeGen/X86/GlobalISel/shl-scalar-widening.ll
index 5f82567ebeb..96056c16387 100644
--- a/llvm/test/CodeGen/X86/GlobalISel/shl-scalar-widening.ll
+++ b/llvm/test/CodeGen/X86/GlobalISel/shl-scalar-widening.ll
@@ -1,54 +1,54 @@
-; 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=X64
-
-define i16 @test_shl_i4(i16 %v, i16 %a, i16 %b) {
+; 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=X64
+
+define i16 @test_shl_i4(i16 %v, i16 %a, i16 %b) {
; Let's say the arguments are the following unsigned
; integers in two’s complement representation:
;
-; %v: 77 (0000 0000 0100 1101)
-; %a: 74 (0000 0000 0100 1010)
-; %b: 72 (0000 0000 0100 1000)
-; X64-LABEL: test_shl_i4:
-; X64: # %bb.0:
-; X64-NEXT: movl %edi, %eax
-; X64-NEXT: movl %edx, %ecx
-; X64-NEXT: addb %sil, %cl
-; X64-NEXT: andb $15, %cl
-; X64-NEXT: # kill: def $cl killed $cl killed $ecx
-; X64-NEXT: shlb %cl, %al
-; X64-NEXT: andw $15, %ax
-; X64-NEXT: # kill: def $ax killed $ax killed $eax
-; X64-NEXT: retq
- %v.t = trunc i16 %v to i4 ; %v.t: 13 (1101)
- %a.t = trunc i16 %a to i4 ; %a.t: 10 (1010)
- %b.t = trunc i16 %b to i4 ; %b.t: 8 (1000)
+; %v: 77 (0000 0000 0100 1101)
+; %a: 74 (0000 0000 0100 1010)
+; %b: 72 (0000 0000 0100 1000)
+; X64-LABEL: test_shl_i4:
+; X64: # %bb.0:
+; X64-NEXT: movl %edi, %eax
+; X64-NEXT: movl %edx, %ecx
+; X64-NEXT: addb %sil, %cl
+; X64-NEXT: andb $15, %cl
+; X64-NEXT: # kill: def $cl killed $cl killed $ecx
+; X64-NEXT: shlb %cl, %al
+; X64-NEXT: andw $15, %ax
+; X64-NEXT: # kill: def $ax killed $ax killed $eax
+; X64-NEXT: retq
+ %v.t = trunc i16 %v to i4 ; %v.t: 13 (1101)
+ %a.t = trunc i16 %a to i4 ; %a.t: 10 (1010)
+ %b.t = trunc i16 %b to i4 ; %b.t: 8 (1000)
%n.t = add i4 %a.t, %b.t ; %n.t: 2 (0010)
%r.t = shl i4 %v.t, %n.t ; %r.t: 4 (0100)
%r = zext i4 %r.t to i16
-; %r: 4 (0000 0000 0000 0100)
- ret i16 %r
-
-; %di: 77 (0000 0000 0100 1101)
-; %si: 74 (0000 0000 0100 1010)
-; %dx: 72 (0000 0000 0100 1000)
-; %dx: 146 (0000 0000 1001 0010)
-; %dx: 2 (0000 0000 0000 0010)
-; %cx: 2 (0000 0000 0000 0010)
-; %di: 52 (0000 0000 0011 0100)
-; %di: 4 (0000 0000 0000 0100)
-; %ax: 4 (0000 0000 0000 0100)
-; Let's pretend that legalizing G_SHL by widening its second
-; source operand is done via G_ANYEXT rather than G_ZEXT and
-; see what happens:
-; addb %sil, %dl
-; %dx: 146 (0000 0000 1001 0010)
-; movl %edx, %ecx
-; %cx: 146 (0000 0000 1001 0010)
-; shlb %cl, %dil
-; %di: 0 (0000 0000 0000 0000)
-; andw $15, %di
-; %di: 0 (0000 0000 0000 0000)
-; movl %edi, %eax
-; %ax: 0 (0000 0000 0000 0000)
-; retq
-}
+; %r: 4 (0000 0000 0000 0100)
+ ret i16 %r
+
+; %di: 77 (0000 0000 0100 1101)
+; %si: 74 (0000 0000 0100 1010)
+; %dx: 72 (0000 0000 0100 1000)
+; %dx: 146 (0000 0000 1001 0010)
+; %dx: 2 (0000 0000 0000 0010)
+; %cx: 2 (0000 0000 0000 0010)
+; %di: 52 (0000 0000 0011 0100)
+; %di: 4 (0000 0000 0000 0100)
+; %ax: 4 (0000 0000 0000 0100)
+; Let's pretend that legalizing G_SHL by widening its second
+; source operand is done via G_ANYEXT rather than G_ZEXT and
+; see what happens:
+; addb %sil, %dl
+; %dx: 146 (0000 0000 1001 0010)
+; movl %edx, %ecx
+; %cx: 146 (0000 0000 1001 0010)
+; shlb %cl, %dil
+; %di: 0 (0000 0000 0000 0000)
+; andw $15, %di
+; %di: 0 (0000 0000 0000 0000)
+; movl %edi, %eax
+; %ax: 0 (0000 0000 0000 0000)
+; retq
+}
diff --git a/llvm/test/CodeGen/X86/GlobalISel/shl-scalar.ll b/llvm/test/CodeGen/X86/GlobalISel/shl-scalar.ll
index 8d04ae44ca7..54345fb4038 100644
--- a/llvm/test/CodeGen/X86/GlobalISel/shl-scalar.ll
+++ b/llvm/test/CodeGen/X86/GlobalISel/shl-scalar.ll
@@ -1,187 +1,187 @@
; 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=X64
-define i64 @test_shl_i64(i64 %arg1, i64 %arg2) {
-; X64-LABEL: test_shl_i64:
-; X64: # %bb.0:
-; X64-NEXT: movq %rdi, %rax
-; X64-NEXT: movq %rsi, %rcx
-; X64-NEXT: # kill: def $cl killed $rcx
-; X64-NEXT: shlq %cl, %rax
-; X64-NEXT: retq
- %res = shl i64 %arg1, %arg2
- ret i64 %res
-}
-
-define i64 @test_shl_i64_imm(i64 %arg1) {
-; X64-LABEL: test_shl_i64_imm:
-; X64: # %bb.0:
-; X64-NEXT: movq %rdi, %rax
-; X64-NEXT: movq $5, %rcx
-; X64-NEXT: # kill: def $cl killed $rcx
-; X64-NEXT: shlq %cl, %rax
-; X64-NEXT: retq
- %res = shl i64 %arg1, 5
- ret i64 %res
-}
-
-define i64 @test_shl_i64_imm1(i64 %arg1) {
-; X64-LABEL: test_shl_i64_imm1:
-; X64: # %bb.0:
-; X64-NEXT: movq %rdi, %rax
-; X64-NEXT: movq $1, %rcx
-; X64-NEXT: # kill: def $cl killed $rcx
-; X64-NEXT: shlq %cl, %rax
-; X64-NEXT: retq
- %res = shl i64 %arg1, 1
- ret i64 %res
-}
-
-define i32 @test_shl_i32(i32 %arg1, i32 %arg2) {
-; X64-LABEL: test_shl_i32:
-; X64: # %bb.0:
-; X64-NEXT: movl %edi, %eax
-; X64-NEXT: movl %esi, %ecx
-; X64-NEXT: # kill: def $cl killed $ecx
-; X64-NEXT: shll %cl, %eax
-; X64-NEXT: retq
- %res = shl i32 %arg1, %arg2
- ret i32 %res
-}
-
-define i32 @test_shl_i32_imm(i32 %arg1) {
-; X64-LABEL: test_shl_i32_imm:
-; X64: # %bb.0:
-; X64-NEXT: movl %edi, %eax
-; X64-NEXT: movl $5, %ecx
-; X64-NEXT: # kill: def $cl killed $ecx
-; X64-NEXT: shll %cl, %eax
-; X64-NEXT: retq
- %res = shl i32 %arg1, 5
- ret i32 %res
-}
-
-define i32 @test_shl_i32_imm1(i32 %arg1) {
-; X64-LABEL: test_shl_i32_imm1:
-; X64: # %bb.0:
-; X64-NEXT: movl %edi, %eax
-; X64-NEXT: movl $1, %ecx
-; X64-NEXT: # kill: def $cl killed $ecx
-; X64-NEXT: shll %cl, %eax
-; X64-NEXT: retq
- %res = shl i32 %arg1, 1
- ret i32 %res
-}
-
-define i16 @test_shl_i16(i32 %arg1, i32 %arg2) {
-; X64-LABEL: test_shl_i16:
-; X64: # %bb.0:
-; X64-NEXT: movl %edi, %eax
-; X64-NEXT: movl %esi, %ecx
-; X64-NEXT: # kill: def $cx killed $cx killed $ecx
-; X64-NEXT: # kill: def $cl killed $cx
-; X64-NEXT: shlw %cl, %ax
-; X64-NEXT: # kill: def $ax killed $ax killed $eax
-; X64-NEXT: retq
- %a = trunc i32 %arg1 to i16
- %a2 = trunc i32 %arg2 to i16
+define i64 @test_shl_i64(i64 %arg1, i64 %arg2) {
+; X64-LABEL: test_shl_i64:
+; X64: # %bb.0:
+; X64-NEXT: movq %rdi, %rax
+; X64-NEXT: movq %rsi, %rcx
+; X64-NEXT: # kill: def $cl killed $rcx
+; X64-NEXT: shlq %cl, %rax
+; X64-NEXT: retq
+ %res = shl i64 %arg1, %arg2
+ ret i64 %res
+}
+
+define i64 @test_shl_i64_imm(i64 %arg1) {
+; X64-LABEL: test_shl_i64_imm:
+; X64: # %bb.0:
+; X64-NEXT: movq %rdi, %rax
+; X64-NEXT: movq $5, %rcx
+; X64-NEXT: # kill: def $cl killed $rcx
+; X64-NEXT: shlq %cl, %rax
+; X64-NEXT: retq
+ %res = shl i64 %arg1, 5
+ ret i64 %res
+}
+
+define i64 @test_shl_i64_imm1(i64 %arg1) {
+; X64-LABEL: test_shl_i64_imm1:
+; X64: # %bb.0:
+; X64-NEXT: movq %rdi, %rax
+; X64-NEXT: movq $1, %rcx
+; X64-NEXT: # kill: def $cl killed $rcx
+; X64-NEXT: shlq %cl, %rax
+; X64-NEXT: retq
+ %res = shl i64 %arg1, 1
+ ret i64 %res
+}
+
+define i32 @test_shl_i32(i32 %arg1, i32 %arg2) {
+; X64-LABEL: test_shl_i32:
+; X64: # %bb.0:
+; X64-NEXT: movl %edi, %eax
+; X64-NEXT: movl %esi, %ecx
+; X64-NEXT: # kill: def $cl killed $ecx
+; X64-NEXT: shll %cl, %eax
+; X64-NEXT: retq
+ %res = shl i32 %arg1, %arg2
+ ret i32 %res
+}
+
+define i32 @test_shl_i32_imm(i32 %arg1) {
+; X64-LABEL: test_shl_i32_imm:
+; X64: # %bb.0:
+; X64-NEXT: movl %edi, %eax
+; X64-NEXT: movl $5, %ecx
+; X64-NEXT: # kill: def $cl killed $ecx
+; X64-NEXT: shll %cl, %eax
+; X64-NEXT: retq
+ %res = shl i32 %arg1, 5
+ ret i32 %res
+}
+
+define i32 @test_shl_i32_imm1(i32 %arg1) {
+; X64-LABEL: test_shl_i32_imm1:
+; X64: # %bb.0:
+; X64-NEXT: movl %edi, %eax
+; X64-NEXT: movl $1, %ecx
+; X64-NEXT: # kill: def $cl killed $ecx
+; X64-NEXT: shll %cl, %eax
+; X64-NEXT: retq
+ %res = shl i32 %arg1, 1
+ ret i32 %res
+}
+
+define i16 @test_shl_i16(i32 %arg1, i32 %arg2) {
+; X64-LABEL: test_shl_i16:
+; X64: # %bb.0:
+; X64-NEXT: movl %edi, %eax
+; X64-NEXT: movl %esi, %ecx
+; X64-NEXT: # kill: def $cx killed $cx killed $ecx
+; X64-NEXT: # kill: def $cl killed $cx
+; X64-NEXT: shlw %cl, %ax
+; X64-NEXT: # kill: def $ax killed $ax killed $eax
+; X64-NEXT: retq
+ %a = trunc i32 %arg1 to i16
+ %a2 = trunc i32 %arg2 to i16
%res = shl i16 %a, %a2
ret i16 %res
}
-define i16 @test_shl_i16_imm(i32 %arg1) {
-; X64-LABEL: test_shl_i16_imm:
-; X64: # %bb.0:
-; X64-NEXT: movl %edi, %eax
-; X64-NEXT: movw $5, %cx
-; X64-NEXT: # kill: def $cl killed $cx
-; X64-NEXT: shlw %cl, %ax
-; X64-NEXT: # kill: def $ax killed $ax killed $eax
-; X64-NEXT: retq
- %a = trunc i32 %arg1 to i16
- %res = shl i16 %a, 5
+define i16 @test_shl_i16_imm(i32 %arg1) {
+; X64-LABEL: test_shl_i16_imm:
+; X64: # %bb.0:
+; X64-NEXT: movl %edi, %eax
+; X64-NEXT: movw $5, %cx
+; X64-NEXT: # kill: def $cl killed $cx
+; X64-NEXT: shlw %cl, %ax
+; X64-NEXT: # kill: def $ax killed $ax killed $eax
+; X64-NEXT: retq
+ %a = trunc i32 %arg1 to i16
+ %res = shl i16 %a, 5
ret i16 %res
}
-define i16 @test_shl_i16_imm1(i32 %arg1) {
-; X64-LABEL: test_shl_i16_imm1:
-; X64: # %bb.0:
-; X64-NEXT: movl %edi, %eax
-; X64-NEXT: movw $1, %cx
-; X64-NEXT: # kill: def $cl killed $cx
-; X64-NEXT: shlw %cl, %ax
-; X64-NEXT: # kill: def $ax killed $ax killed $eax
-; X64-NEXT: retq
- %a = trunc i32 %arg1 to i16
- %res = shl i16 %a, 1
+define i16 @test_shl_i16_imm1(i32 %arg1) {
+; X64-LABEL: test_shl_i16_imm1:
+; X64: # %bb.0:
+; X64-NEXT: movl %edi, %eax
+; X64-NEXT: movw $1, %cx
+; X64-NEXT: # kill: def $cl killed $cx
+; X64-NEXT: shlw %cl, %ax
+; X64-NEXT: # kill: def $ax killed $ax killed $eax
+; X64-NEXT: retq
+ %a = trunc i32 %arg1 to i16
+ %res = shl i16 %a, 1
ret i16 %res
}
-define i8 @test_shl_i8(i32 %arg1, i32 %arg2) {
-; X64-LABEL: test_shl_i8:
-; X64: # %bb.0:
-; X64-NEXT: movl %edi, %eax
-; X64-NEXT: movl %esi, %ecx
-; X64-NEXT: # kill: def $cl killed $cl killed $ecx
-; X64-NEXT: shlb %cl, %al
-; X64-NEXT: # kill: def $al killed $al killed $eax
-; X64-NEXT: retq
- %a = trunc i32 %arg1 to i8
- %a2 = trunc i32 %arg2 to i8
+define i8 @test_shl_i8(i32 %arg1, i32 %arg2) {
+; X64-LABEL: test_shl_i8:
+; X64: # %bb.0:
+; X64-NEXT: movl %edi, %eax
+; X64-NEXT: movl %esi, %ecx
+; X64-NEXT: # kill: def $cl killed $cl killed $ecx
+; X64-NEXT: shlb %cl, %al
+; X64-NEXT: # kill: def $al killed $al killed $eax
+; X64-NEXT: retq
+ %a = trunc i32 %arg1 to i8
+ %a2 = trunc i32 %arg2 to i8
%res = shl i8 %a, %a2
ret i8 %res
}
-define i8 @test_shl_i8_imm(i32 %arg1) {
-; X64-LABEL: test_shl_i8_imm:
-; X64: # %bb.0:
-; X64-NEXT: movl %edi, %eax
-; X64-NEXT: shlb $5, %al
-; X64-NEXT: # kill: def $al killed $al killed $eax
-; X64-NEXT: retq
- %a = trunc i32 %arg1 to i8
- %res = shl i8 %a, 5
+define i8 @test_shl_i8_imm(i32 %arg1) {
+; X64-LABEL: test_shl_i8_imm:
+; X64: # %bb.0:
+; X64-NEXT: movl %edi, %eax
+; X64-NEXT: shlb $5, %al
+; X64-NEXT: # kill: def $al killed $al killed $eax
+; X64-NEXT: retq
+ %a = trunc i32 %arg1 to i8
+ %res = shl i8 %a, 5
ret i8 %res
}
-define i8 @test_shl_i8_imm1(i32 %arg1) {
-; X64-LABEL: test_shl_i8_imm1:
-; X64: # %bb.0:
-; X64-NEXT: movl %edi, %eax
-; X64-NEXT: addb %al, %al
-; X64-NEXT: # kill: def $al killed $al killed $eax
-; X64-NEXT: retq
- %a = trunc i32 %arg1 to i8
- %res = shl i8 %a, 1
+define i8 @test_shl_i8_imm1(i32 %arg1) {
+; X64-LABEL: test_shl_i8_imm1:
+; X64: # %bb.0:
+; X64-NEXT: movl %edi, %eax
+; X64-NEXT: addb %al, %al
+; X64-NEXT: # kill: def $al killed $al killed $eax
+; X64-NEXT: retq
+ %a = trunc i32 %arg1 to i8
+ %res = shl i8 %a, 1
ret i8 %res
}
-define i1 @test_shl_i1(i32 %arg1, i32 %arg2) {
-; X64-LABEL: test_shl_i1:
-; X64: # %bb.0:
-; X64-NEXT: movl %edi, %eax
-; X64-NEXT: movl %esi, %ecx
-; X64-NEXT: andb $1, %cl
-; X64-NEXT: # kill: def $cl killed $cl killed $ecx
-; X64-NEXT: shlb %cl, %al
-; X64-NEXT: # kill: def $al killed $al killed $eax
-; X64-NEXT: retq
- %a = trunc i32 %arg1 to i1
- %a2 = trunc i32 %arg2 to i1
+define i1 @test_shl_i1(i32 %arg1, i32 %arg2) {
+; X64-LABEL: test_shl_i1:
+; X64: # %bb.0:
+; X64-NEXT: movl %edi, %eax
+; X64-NEXT: movl %esi, %ecx
+; X64-NEXT: andb $1, %cl
+; X64-NEXT: # kill: def $cl killed $cl killed $ecx
+; X64-NEXT: shlb %cl, %al
+; X64-NEXT: # kill: def $al killed $al killed $eax
+; X64-NEXT: retq
+ %a = trunc i32 %arg1 to i1
+ %a2 = trunc i32 %arg2 to i1
%res = shl i1 %a, %a2
ret i1 %res
}
-define i1 @test_shl_i1_imm1(i32 %arg1) {
-; X64-LABEL: test_shl_i1_imm1:
-; X64: # %bb.0:
-; X64-NEXT: movl %edi, %eax
-; X64-NEXT: movb $-1, %cl
-; X64-NEXT: andb $1, %cl
-; X64-NEXT: shlb %cl, %al
-; X64-NEXT: # kill: def $al killed $al killed $eax
-; X64-NEXT: retq
- %a = trunc i32 %arg1 to i1
- %res = shl i1 %a, 1
+define i1 @test_shl_i1_imm1(i32 %arg1) {
+; X64-LABEL: test_shl_i1_imm1:
+; X64: # %bb.0:
+; X64-NEXT: movl %edi, %eax
+; X64-NEXT: movb $-1, %cl
+; X64-NEXT: andb $1, %cl
+; X64-NEXT: shlb %cl, %al
+; X64-NEXT: # kill: def $al killed $al killed $eax
+; X64-NEXT: retq
+ %a = trunc i32 %arg1 to i1
+ %res = shl i1 %a, 1
ret i1 %res
}
diff --git a/llvm/test/CodeGen/X86/GlobalISel/sub-scalar.ll b/llvm/test/CodeGen/X86/GlobalISel/sub-scalar.ll
index 10f6bfe89fc..8bf1b2fdae8 100644
--- a/llvm/test/CodeGen/X86/GlobalISel/sub-scalar.ll
+++ b/llvm/test/CodeGen/X86/GlobalISel/sub-scalar.ll
@@ -1,46 +1,46 @@
; 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=X64
-define i64 @test_sub_i64(i64 %arg1, i64 %arg2) {
-; X64-LABEL: test_sub_i64:
-; X64: # %bb.0:
-; X64-NEXT: movq %rdi, %rax
-; X64-NEXT: subq %rsi, %rax
-; X64-NEXT: retq
- %ret = sub i64 %arg1, %arg2
- ret i64 %ret
-}
-
-define i32 @test_sub_i32(i32 %arg1, i32 %arg2) {
-; X64-LABEL: test_sub_i32:
-; X64: # %bb.0:
-; X64-NEXT: movl %edi, %eax
-; X64-NEXT: subl %esi, %eax
-; X64-NEXT: retq
- %ret = sub i32 %arg1, %arg2
- ret i32 %ret
-}
-
-define i16 @test_sub_i16(i16 %arg1, i16 %arg2) {
-; X64-LABEL: test_sub_i16:
-; X64: # %bb.0:
-; X64-NEXT: movl %edi, %eax
-; X64-NEXT: subw %si, %ax
-; X64-NEXT: # kill: def $ax killed $ax killed $eax
-; X64-NEXT: retq
- %ret = sub i16 %arg1, %arg2
- ret i16 %ret
-}
-
-define i8 @test_sub_i8(i8 %arg1, i8 %arg2) {
-; X64-LABEL: test_sub_i8:
-; X64: # %bb.0:
-; X64-NEXT: movl %edi, %eax
-; X64-NEXT: subb %sil, %al
-; X64-NEXT: # kill: def $al killed $al killed $eax
-; X64-NEXT: retq
- %ret = sub i8 %arg1, %arg2
- ret i8 %ret
+define i64 @test_sub_i64(i64 %arg1, i64 %arg2) {
+; X64-LABEL: test_sub_i64:
+; X64: # %bb.0:
+; X64-NEXT: movq %rdi, %rax
+; X64-NEXT: subq %rsi, %rax
+; X64-NEXT: retq
+ %ret = sub i64 %arg1, %arg2
+ ret i64 %ret
+}
+
+define i32 @test_sub_i32(i32 %arg1, i32 %arg2) {
+; X64-LABEL: test_sub_i32:
+; X64: # %bb.0:
+; X64-NEXT: movl %edi, %eax
+; X64-NEXT: subl %esi, %eax
+; X64-NEXT: retq
+ %ret = sub i32 %arg1, %arg2
+ ret i32 %ret
+}
+
+define i16 @test_sub_i16(i16 %arg1, i16 %arg2) {
+; X64-LABEL: test_sub_i16:
+; X64: # %bb.0:
+; X64-NEXT: movl %edi, %eax
+; X64-NEXT: subw %si, %ax
+; X64-NEXT: # kill: def $ax killed $ax killed $eax
+; X64-NEXT: retq
+ %ret = sub i16 %arg1, %arg2
+ ret i16 %ret
+}
+
+define i8 @test_sub_i8(i8 %arg1, i8 %arg2) {
+; X64-LABEL: test_sub_i8:
+; X64: # %bb.0:
+; X64-NEXT: movl %edi, %eax
+; X64-NEXT: subb %sil, %al
+; X64-NEXT: # kill: def $al killed $al killed $eax
+; X64-NEXT: retq
+ %ret = sub i8 %arg1, %arg2
+ ret i8 %ret
}
define i32 @test_sub_i1(i32 %arg1, i32 %arg2) {
diff --git a/llvm/test/CodeGen/X86/GlobalISel/trunc.ll b/llvm/test/CodeGen/X86/GlobalISel/trunc.ll
index 70af0ae669b..6b91773d5fa 100644
--- a/llvm/test/CodeGen/X86/GlobalISel/trunc.ll
+++ b/llvm/test/CodeGen/X86/GlobalISel/trunc.ll
@@ -2,62 +2,62 @@
; RUN: llc -mtriple=x86_64-linux-gnu -global-isel -verify-machineinstrs < %s -o - | FileCheck %s --check-prefix=CHECK
define i1 @trunc_i32toi1(i32 %a) {
-; CHECK-LABEL: trunc_i32toi1:
-; CHECK: # %bb.0:
-; CHECK-NEXT: movl %edi, %eax
-; CHECK-NEXT: # kill: def $al killed $al killed $eax
-; CHECK-NEXT: retq
- %r = trunc i32 %a to i1
- ret i1 %r
+; CHECK-LABEL: trunc_i32toi1:
+; CHECK: # %bb.0:
+; CHECK-NEXT: movl %edi, %eax
+; CHECK-NEXT: # kill: def $al killed $al killed $eax
+; CHECK-NEXT: retq
+ %r = trunc i32 %a to i1
+ ret i1 %r
}
define i8 @trunc_i32toi8(i32 %a) {
-; CHECK-LABEL: trunc_i32toi8:
-; CHECK: # %bb.0:
-; CHECK-NEXT: movl %edi, %eax
-; CHECK-NEXT: # kill: def $al killed $al killed $eax
-; CHECK-NEXT: retq
- %r = trunc i32 %a to i8
- ret i8 %r
+; CHECK-LABEL: trunc_i32toi8:
+; CHECK: # %bb.0:
+; CHECK-NEXT: movl %edi, %eax
+; CHECK-NEXT: # kill: def $al killed $al killed $eax
+; CHECK-NEXT: retq
+ %r = trunc i32 %a to i8
+ ret i8 %r
}
define i16 @trunc_i32toi16(i32 %a) {
-; CHECK-LABEL: trunc_i32toi16:
-; CHECK: # %bb.0:
-; CHECK-NEXT: movl %edi, %eax
-; CHECK-NEXT: # kill: def $ax killed $ax killed $eax
-; CHECK-NEXT: retq
- %r = trunc i32 %a to i16
- ret i16 %r
-}
-
-define i8 @trunc_i64toi8(i64 %a) {
-; CHECK-LABEL: trunc_i64toi8:
-; CHECK: # %bb.0:
-; CHECK-NEXT: movq %rdi, %rax
-; CHECK-NEXT: # kill: def $al killed $al killed $rax
-; CHECK-NEXT: retq
- %r = trunc i64 %a to i8
- ret i8 %r
-}
-
-define i16 @trunc_i64toi16(i64 %a) {
-; CHECK-LABEL: trunc_i64toi16:
-; CHECK: # %bb.0:
-; CHECK-NEXT: movq %rdi, %rax
-; CHECK-NEXT: # kill: def $ax killed $ax killed $rax
-; CHECK-NEXT: retq
- %r = trunc i64 %a to i16
- ret i16 %r
-}
-
-define i32 @trunc_i64toi32(i64 %a) {
-; CHECK-LABEL: trunc_i64toi32:
-; CHECK: # %bb.0:
-; CHECK-NEXT: movq %rdi, %rax
-; CHECK-NEXT: # kill: def $eax killed $eax killed $rax
-; CHECK-NEXT: retq
- %r = trunc i64 %a to i32
- ret i32 %r
+; CHECK-LABEL: trunc_i32toi16:
+; CHECK: # %bb.0:
+; CHECK-NEXT: movl %edi, %eax
+; CHECK-NEXT: # kill: def $ax killed $ax killed $eax
+; CHECK-NEXT: retq
+ %r = trunc i32 %a to i16
+ ret i16 %r
+}
+
+define i8 @trunc_i64toi8(i64 %a) {
+; CHECK-LABEL: trunc_i64toi8:
+; CHECK: # %bb.0:
+; CHECK-NEXT: movq %rdi, %rax
+; CHECK-NEXT: # kill: def $al killed $al killed $rax
+; CHECK-NEXT: retq
+ %r = trunc i64 %a to i8
+ ret i8 %r
+}
+
+define i16 @trunc_i64toi16(i64 %a) {
+; CHECK-LABEL: trunc_i64toi16:
+; CHECK: # %bb.0:
+; CHECK-NEXT: movq %rdi, %rax
+; CHECK-NEXT: # kill: def $ax killed $ax killed $rax
+; CHECK-NEXT: retq
+ %r = trunc i64 %a to i16
+ ret i16 %r
+}
+
+define i32 @trunc_i64toi32(i64 %a) {
+; CHECK-LABEL: trunc_i64toi32:
+; CHECK: # %bb.0:
+; CHECK-NEXT: movq %rdi, %rax
+; CHECK-NEXT: # kill: def $eax killed $eax killed $rax
+; CHECK-NEXT: retq
+ %r = trunc i64 %a to i32
+ ret i32 %r
}
diff --git a/llvm/test/CodeGen/X86/GlobalISel/undef.ll b/llvm/test/CodeGen/X86/GlobalISel/undef.ll
index 41d278d56f0..106c2673a2e 100644
--- a/llvm/test/CodeGen/X86/GlobalISel/undef.ll
+++ b/llvm/test/CodeGen/X86/GlobalISel/undef.ll
@@ -8,15 +8,15 @@ define i8 @test() {
ret i8 undef
}
-define i8 @test2(i8 %a) {
-; ALL-LABEL: test2:
-; ALL: # %bb.0:
-; ALL-NEXT: movl %edi, %eax
-; ALL-NEXT: addb %al, %al
-; ALL-NEXT: # kill: def $al killed $al killed $eax
-; ALL-NEXT: retq
- %r = add i8 %a, undef
- ret i8 %r
+define i8 @test2(i8 %a) {
+; ALL-LABEL: test2:
+; ALL: # %bb.0:
+; ALL-NEXT: movl %edi, %eax
+; ALL-NEXT: addb %al, %al
+; ALL-NEXT: # kill: def $al killed $al killed $eax
+; ALL-NEXT: retq
+ %r = add i8 %a, undef
+ ret i8 %r
}
diff --git a/llvm/test/CodeGen/X86/GlobalISel/xor-scalar.ll b/llvm/test/CodeGen/X86/GlobalISel/xor-scalar.ll
index 8ae8e163b0d..5a256d5875f 100644
--- a/llvm/test/CodeGen/X86/GlobalISel/xor-scalar.ll
+++ b/llvm/test/CodeGen/X86/GlobalISel/xor-scalar.ll
@@ -16,45 +16,45 @@ define i32 @test_xor_i1(i32 %arg1, i32 %arg2) {
ret i32 %ret
}
-define i8 @test_xor_i8(i8 %arg1, i8 %arg2) {
-; ALL-LABEL: test_xor_i8:
-; ALL: # %bb.0:
-; ALL-NEXT: movl %esi, %eax
-; ALL-NEXT: xorb %dil, %al
-; ALL-NEXT: # kill: def $al killed $al killed $eax
-; ALL-NEXT: retq
- %ret = xor i8 %arg1, %arg2
- ret i8 %ret
-}
-
-define i16 @test_xor_i16(i16 %arg1, i16 %arg2) {
-; ALL-LABEL: test_xor_i16:
-; ALL: # %bb.0:
-; ALL-NEXT: movl %esi, %eax
-; ALL-NEXT: xorw %di, %ax
-; ALL-NEXT: # kill: def $ax killed $ax killed $eax
-; ALL-NEXT: retq
- %ret = xor i16 %arg1, %arg2
- ret i16 %ret
-}
-
-define i32 @test_xor_i32(i32 %arg1, i32 %arg2) {
-; ALL-LABEL: test_xor_i32:
-; ALL: # %bb.0:
-; ALL-NEXT: movl %esi, %eax
-; ALL-NEXT: xorl %edi, %eax
-; ALL-NEXT: retq
- %ret = xor i32 %arg1, %arg2
- ret i32 %ret
-}
-
-define i64 @test_xor_i64(i64 %arg1, i64 %arg2) {
-; ALL-LABEL: test_xor_i64:
-; ALL: # %bb.0:
-; ALL-NEXT: movq %rsi, %rax
-; ALL-NEXT: xorq %rdi, %rax
-; ALL-NEXT: retq
- %ret = xor i64 %arg1, %arg2
- ret i64 %ret
+define i8 @test_xor_i8(i8 %arg1, i8 %arg2) {
+; ALL-LABEL: test_xor_i8:
+; ALL: # %bb.0:
+; ALL-NEXT: movl %esi, %eax
+; ALL-NEXT: xorb %dil, %al
+; ALL-NEXT: # kill: def $al killed $al killed $eax
+; ALL-NEXT: retq
+ %ret = xor i8 %arg1, %arg2
+ ret i8 %ret
+}
+
+define i16 @test_xor_i16(i16 %arg1, i16 %arg2) {
+; ALL-LABEL: test_xor_i16:
+; ALL: # %bb.0:
+; ALL-NEXT: movl %esi, %eax
+; ALL-NEXT: xorw %di, %ax
+; ALL-NEXT: # kill: def $ax killed $ax killed $eax
+; ALL-NEXT: retq
+ %ret = xor i16 %arg1, %arg2
+ ret i16 %ret
+}
+
+define i32 @test_xor_i32(i32 %arg1, i32 %arg2) {
+; ALL-LABEL: test_xor_i32:
+; ALL: # %bb.0:
+; ALL-NEXT: movl %esi, %eax
+; ALL-NEXT: xorl %edi, %eax
+; ALL-NEXT: retq
+ %ret = xor i32 %arg1, %arg2
+ ret i32 %ret
+}
+
+define i64 @test_xor_i64(i64 %arg1, i64 %arg2) {
+; ALL-LABEL: test_xor_i64:
+; ALL: # %bb.0:
+; ALL-NEXT: movq %rsi, %rax
+; ALL-NEXT: xorq %rdi, %rax
+; ALL-NEXT: retq
+ %ret = xor i64 %arg1, %arg2
+ ret i64 %ret
}
OpenPOWER on IntegriCloud