Skip to content

Commit 0620a63

Browse files
committed
[X86] Regenerate subreg-to-reg tests with update_llc_test_checks.py
1 parent bf67610 commit 0620a63

File tree

3 files changed

+33
-6
lines changed

3 files changed

+33
-6
lines changed

llvm/test/CodeGen/X86/subreg-to-reg-1.ll

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
1+
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4
12
; RUN: llc < %s -mtriple=x86_64-- | FileCheck %s
23

3-
; CHECK: {{leal .*[)], %e.*}}
4-
; CHECK-NOT: {{leal .*[)], %e.*}}
5-
64
; Don't eliminate or coalesce away the explicit zero-extension!
75
; This is currently using an leal because of a 3-addressification detail,
86
; though this isn't necessary; The point of this test is to make sure
97
; a 32-bit add is used.
108

119
define i64 @foo(i64 %a) nounwind {
10+
; CHECK-LABEL: foo:
11+
; CHECK: # %bb.0:
12+
; CHECK-NEXT: leal -1(%rdi), %eax
13+
; CHECK-NEXT: incq %rax
14+
; CHECK-NEXT: retq
1215
%b = add i64 %a, 4294967295
1316
%c = and i64 %b, 4294967295
1417
%d = add i64 %c, 1

llvm/test/CodeGen/X86/subreg-to-reg-3.ll

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1+
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4
12
; RUN: llc < %s -mtriple=x86_64-- | FileCheck %s
23

3-
; CHECK: imull
4-
54
; Don't eliminate or coalesce away the explicit zero-extension!
65

76
define i64 @foo(i64 %a) {
7+
; CHECK-LABEL: foo:
8+
; CHECK: # %bb.0:
9+
; CHECK-NEXT: imull $7823, %edi, %eax # imm = 0x1E8F
10+
; CHECK-NEXT: incq %rax
11+
; CHECK-NEXT: retq
812
%b = mul i64 %a, 7823
913
%c = and i64 %b, 4294967295
1014
%d = add i64 %c, 1

llvm/test/CodeGen/X86/subreg-to-reg-6.ll

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
1-
; RUN: llc < %s -mtriple=x86_64--
1+
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4
2+
; RUN: llc < %s -mtriple=x86_64-- | FileCheck %s
23

34
define i64 @foo() nounwind {
5+
; CHECK-LABEL: foo:
6+
; CHECK: # %bb.0: # %entry
7+
; CHECK-NEXT: cmpl $12, 0
8+
; CHECK-NEXT: je .LBB0_1
9+
; CHECK-NEXT: # %bb.2: # %bb65
10+
; CHECK-NEXT: xorl %ecx, %ecx
11+
; CHECK-NEXT: #APP
12+
; CHECK-NEXT: #NO_APP
13+
; CHECK-NEXT: xorl %eax, %eax
14+
; CHECK-NEXT: retq
15+
; CHECK-NEXT: .LBB0_1: # %bb56
416
entry:
517
%t0 = load i32, ptr null, align 8
618
switch i32 %t0, label %bb65 [
@@ -22,6 +34,14 @@ bb65:
2234
}
2335

2436
define i64 @bar(i64 %t0) nounwind {
37+
; CHECK-LABEL: bar:
38+
; CHECK: # %bb.0:
39+
; CHECK-NEXT: movq %rdi, %rax
40+
; CHECK-NEXT: xorl %ecx, %ecx
41+
; CHECK-NEXT: #APP
42+
; CHECK-NEXT: #NO_APP
43+
; CHECK-NEXT: negl %eax
44+
; CHECK-NEXT: retq
2545
call void asm "", "{cx}"(i64 0) nounwind
2646
%t1 = sub i64 0, %t0
2747
%t2 = and i64 %t1, 4294967295

0 commit comments

Comments
 (0)