[llvm] 0620a63 - [X86] Regenerate subreg-to-reg tests with update_llc_test_checks.py
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 26 08:51:02 PDT 2024
Author: Simon Pilgrim
Date: 2024-04-26T16:50:39+01:00
New Revision: 0620a637e362d1add1fe506307a25d0353e254f5
URL: https://github.com/llvm/llvm-project/commit/0620a637e362d1add1fe506307a25d0353e254f5
DIFF: https://github.com/llvm/llvm-project/commit/0620a637e362d1add1fe506307a25d0353e254f5.diff
LOG: [X86] Regenerate subreg-to-reg tests with update_llc_test_checks.py
Added:
Modified:
llvm/test/CodeGen/X86/subreg-to-reg-1.ll
llvm/test/CodeGen/X86/subreg-to-reg-3.ll
llvm/test/CodeGen/X86/subreg-to-reg-6.ll
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/X86/subreg-to-reg-1.ll b/llvm/test/CodeGen/X86/subreg-to-reg-1.ll
index 8acdb6176f575e..49bff9e075e578 100644
--- a/llvm/test/CodeGen/X86/subreg-to-reg-1.ll
+++ b/llvm/test/CodeGen/X86/subreg-to-reg-1.ll
@@ -1,14 +1,17 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4
; RUN: llc < %s -mtriple=x86_64-- | FileCheck %s
-; CHECK: {{leal .*[)], %e.*}}
-; CHECK-NOT: {{leal .*[)], %e.*}}
-
; Don't eliminate or coalesce away the explicit zero-extension!
; This is currently using an leal because of a 3-addressification detail,
; though this isn't necessary; The point of this test is to make sure
; a 32-bit add is used.
define i64 @foo(i64 %a) nounwind {
+; CHECK-LABEL: foo:
+; CHECK: # %bb.0:
+; CHECK-NEXT: leal -1(%rdi), %eax
+; CHECK-NEXT: incq %rax
+; CHECK-NEXT: retq
%b = add i64 %a, 4294967295
%c = and i64 %b, 4294967295
%d = add i64 %c, 1
diff --git a/llvm/test/CodeGen/X86/subreg-to-reg-3.ll b/llvm/test/CodeGen/X86/subreg-to-reg-3.ll
index db9d0d12c3d761..2bd5ca1716af42 100644
--- a/llvm/test/CodeGen/X86/subreg-to-reg-3.ll
+++ b/llvm/test/CodeGen/X86/subreg-to-reg-3.ll
@@ -1,10 +1,14 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4
; RUN: llc < %s -mtriple=x86_64-- | FileCheck %s
-; CHECK: imull
-
; Don't eliminate or coalesce away the explicit zero-extension!
define i64 @foo(i64 %a) {
+; CHECK-LABEL: foo:
+; CHECK: # %bb.0:
+; CHECK-NEXT: imull $7823, %edi, %eax # imm = 0x1E8F
+; CHECK-NEXT: incq %rax
+; CHECK-NEXT: retq
%b = mul i64 %a, 7823
%c = and i64 %b, 4294967295
%d = add i64 %c, 1
diff --git a/llvm/test/CodeGen/X86/subreg-to-reg-6.ll b/llvm/test/CodeGen/X86/subreg-to-reg-6.ll
index 7a6f78fac368d3..f0dc17b5566130 100644
--- a/llvm/test/CodeGen/X86/subreg-to-reg-6.ll
+++ b/llvm/test/CodeGen/X86/subreg-to-reg-6.ll
@@ -1,6 +1,18 @@
-; RUN: llc < %s -mtriple=x86_64--
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4
+; RUN: llc < %s -mtriple=x86_64-- | FileCheck %s
define i64 @foo() nounwind {
+; CHECK-LABEL: foo:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: cmpl $12, 0
+; CHECK-NEXT: je .LBB0_1
+; CHECK-NEXT: # %bb.2: # %bb65
+; CHECK-NEXT: xorl %ecx, %ecx
+; CHECK-NEXT: #APP
+; CHECK-NEXT: #NO_APP
+; CHECK-NEXT: xorl %eax, %eax
+; CHECK-NEXT: retq
+; CHECK-NEXT: .LBB0_1: # %bb56
entry:
%t0 = load i32, ptr null, align 8
switch i32 %t0, label %bb65 [
@@ -22,6 +34,14 @@ bb65:
}
define i64 @bar(i64 %t0) nounwind {
+; CHECK-LABEL: bar:
+; CHECK: # %bb.0:
+; CHECK-NEXT: movq %rdi, %rax
+; CHECK-NEXT: xorl %ecx, %ecx
+; CHECK-NEXT: #APP
+; CHECK-NEXT: #NO_APP
+; CHECK-NEXT: negl %eax
+; CHECK-NEXT: retq
call void asm "", "{cx}"(i64 0) nounwind
%t1 = sub i64 0, %t0
%t2 = and i64 %t1, 4294967295
More information about the llvm-commits
mailing list