[llvm] 94d5f01 - [X86][CodeGen][test] Add `dead` modifier for eflags w/o users, NFCI

Shengchen Kan via llvm-commits llvm-commits at lists.llvm.org
Mon May 27 20:05:29 PDT 2024


Author: Shengchen Kan
Date: 2024-05-28T10:51:36+08:00
New Revision: 94d5f01ecbc26d5c8d28d4406f77a7c966e38ef5

URL: https://github.com/llvm/llvm-project/commit/94d5f01ecbc26d5c8d28d4406f77a7c966e38ef5
DIFF: https://github.com/llvm/llvm-project/commit/94d5f01ecbc26d5c8d28d4406f77a7c966e38ef5.diff

LOG: [X86][CodeGen][test] Add `dead` modifier for eflags w/o users, NFCI

This is for the coming NF (no flags update) support in flag copy
lowering.

Added: 
    

Modified: 
    llvm/test/CodeGen/X86/apx/ccmp-flags-copy-lowering.mir

Removed: 
    


################################################################################
diff  --git a/llvm/test/CodeGen/X86/apx/ccmp-flags-copy-lowering.mir b/llvm/test/CodeGen/X86/apx/ccmp-flags-copy-lowering.mir
index 52d4c4cfb2aaa..25204be145c00 100644
--- a/llvm/test/CodeGen/X86/apx/ccmp-flags-copy-lowering.mir
+++ b/llvm/test/CodeGen/X86/apx/ccmp-flags-copy-lowering.mir
@@ -14,13 +14,13 @@ body:             |
     ; CHECK-NEXT: {{  $}}
     ; CHECK-NEXT: MUL32r $edi, implicit-def $eax, implicit-def dead $edx, implicit-def $eflags, implicit $eax
     ; CHECK-NEXT: [[SETCCr:%[0-9]+]]:gr8 = SETCCr 1, implicit $eflags
-    ; CHECK-NEXT: [[ADD32rr:%[0-9]+]]:gr32 = ADD32rr $edi, $edi, implicit-def $eflags
+    ; CHECK-NEXT: [[ADD32rr:%[0-9]+]]:gr32 = ADD32rr $edi, $edi, implicit-def dead $eflags
     ; CHECK-NEXT: TEST8rr [[SETCCr]], [[SETCCr]], implicit-def $eflags
     ; CHECK-NEXT: CCMP32rr [[ADD32rr]], [[ADD32rr]], 0, 5, implicit-def $eflags, implicit killed $eflags
     ; CHECK-NEXT: RET 0, $al
     MUL32r $edi, implicit-def $eax, implicit-def dead $edx, implicit-def $eflags, implicit $eax
     %1:gr64 = COPY $eflags
-    %2:gr32 = ADD32rr $edi, $edi, implicit-def $eflags
+    %2:gr32 = ADD32rr $edi, $edi, implicit-def dead $eflags
     $eflags = COPY %1
     CCMP32rr %2, %2, 0, 1, implicit-def $eflags, implicit $eflags
     RET 0, $al
@@ -37,13 +37,13 @@ body:             |
     ; CHECK-NEXT: {{  $}}
     ; CHECK-NEXT: MUL32r $edi, implicit-def $eax, implicit-def dead $edx, implicit-def $eflags, implicit $eax
     ; CHECK-NEXT: [[SETCCr:%[0-9]+]]:gr8 = SETCCr 1, implicit $eflags
-    ; CHECK-NEXT: [[ADD32rr:%[0-9]+]]:gr32 = ADD32rr $edi, $edi, implicit-def $eflags
+    ; CHECK-NEXT: [[ADD32rr:%[0-9]+]]:gr32 = ADD32rr $edi, $edi, implicit-def dead $eflags
     ; CHECK-NEXT: TEST8rr [[SETCCr]], [[SETCCr]], implicit-def $eflags
     ; CHECK-NEXT: CTEST32rr [[ADD32rr]], [[ADD32rr]], 0, 5, implicit-def $eflags, implicit killed $eflags
     ; CHECK-NEXT: RET 0, $al
     MUL32r $edi, implicit-def $eax, implicit-def dead $edx, implicit-def $eflags, implicit $eax
     %1:gr64 = COPY $eflags
-    %2:gr32 = ADD32rr $edi, $edi, implicit-def $eflags
+    %2:gr32 = ADD32rr $edi, $edi, implicit-def dead $eflags
     $eflags = COPY %1
     CTEST32rr %2, %2, 0, 1, implicit-def $eflags, implicit $eflags
     RET 0, $al


        


More information about the llvm-commits mailing list