[llvm] 7f1ffef - [X86] Replace some regular expressions in xray tests with explicit checks to show bad assembly.

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 23 23:20:59 PDT 2019


Author: Craig Topper
Date: 2019-10-23T23:05:09-07:00
New Revision: 7f1ffef567a749e7a3e369239f34a3f2a4887e63

URL: https://github.com/llvm/llvm-project/commit/7f1ffef567a749e7a3e369239f34a3f2a4887e63
DIFF: https://github.com/llvm/llvm-project/commit/7f1ffef567a749e7a3e369239f34a3f2a4887e63.diff

LOG: [X86] Replace some regular expressions in xray tests with explicit checks to show bad assembly.

We're print 16-bit or 32-bit registers in copy instructions to
64-bit registers. This code will not assemble if it were to be
parsed back in. Emitting to binary works because we'll encode
the register the same way no matter what the size is.

Added: 
    

Modified: 
    llvm/test/CodeGen/X86/xray-custom-log.ll
    llvm/test/CodeGen/X86/xray-typed-event-log.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/CodeGen/X86/xray-custom-log.ll b/llvm/test/CodeGen/X86/xray-custom-log.ll
index e60c76a4ec57..17bb3b6c6d52 100644
--- a/llvm/test/CodeGen/X86/xray-custom-log.ll
+++ b/llvm/test/CodeGen/X86/xray-custom-log.ll
@@ -12,8 +12,8 @@ define i32 @fn() nounwind noinline uwtable "function-instrument"="xray-always" {
     ; CHECK:       .byte 0xeb, 0x0f
     ; CHECK-NEXT:  pushq %rdi
     ; CHECK-NEXT:  pushq %rsi
-    ; CHECK-NEXT:  movq {{.*}}, %rdi
-    ; CHECK-NEXT:  movq {{.*}}, %rsi
+    ; CHECK-NEXT:  movq %rcx, %rdi
+    ; CHECK-NEXT:  movq %eax, %rsi
     ; CHECK-NEXT:  callq __xray_CustomEvent
     ; CHECK-NEXT:  popq %rsi
     ; CHECK-NEXT:  popq %rdi
@@ -22,8 +22,8 @@ define i32 @fn() nounwind noinline uwtable "function-instrument"="xray-always" {
     ; PIC:       .byte 0xeb, 0x0f
     ; PIC-NEXT:  pushq %rdi
     ; PIC-NEXT:  pushq %rsi
-    ; PIC-NEXT:  movq {{.*}}, %rdi
-    ; PIC-NEXT:  movq {{.*}}, %rsi
+    ; PIC-NEXT:  movq %rcx, %rdi
+    ; PIC-NEXT:  movq %eax, %rsi
     ; PIC-NEXT:  callq __xray_CustomEvent at PLT
     ; PIC-NEXT:  popq %rsi
     ; PIC-NEXT:  popq %rdi

diff  --git a/llvm/test/CodeGen/X86/xray-typed-event-log.ll b/llvm/test/CodeGen/X86/xray-typed-event-log.ll
index a69206ed7e7d..0aeca2016131 100644
--- a/llvm/test/CodeGen/X86/xray-typed-event-log.ll
+++ b/llvm/test/CodeGen/X86/xray-typed-event-log.ll
@@ -16,9 +16,9 @@ define i32 @fn() nounwind noinline uwtable "function-instrument"="xray-always" {
     ; CHECK-NEXT:  pushq %rdi
     ; CHECK-NEXT:  pushq %rsi
     ; CHECK-NEXT:  pushq %rdx
-    ; CHECK-NEXT:  movq {{.*}}, %rdi
-    ; CHECK-NEXT:  movq {{.*}}, %rsi
-    ; CHECK-NEXT:  movq {{.*}}, %rdx
+    ; CHECK-NEXT:  movq %dx, %rdi
+    ; CHECK-NEXT:  movq %rcx, %rsi
+    ; CHECK-NEXT:  movq %eax, %rdx
     ; CHECK-NEXT:  callq __xray_TypedEvent
     ; CHECK-NEXT:  popq %rdx
     ; CHECK-NEXT:  popq %rsi
@@ -29,9 +29,9 @@ define i32 @fn() nounwind noinline uwtable "function-instrument"="xray-always" {
     ; PIC-NEXT:  pushq %rdi
     ; PIC-NEXT:  pushq %rsi
     ; PIC-NEXT:  pushq %rdx
-    ; PIC-NEXT:  movq {{.*}}, %rdi
-    ; PIC-NEXT:  movq {{.*}}, %rsi
-    ; PIC-NEXT:  movq {{.*}}, %rdx
+    ; PIC-NEXT:  movq %dx, %rdi
+    ; PIC-NEXT:  movq %rcx, %rsi
+    ; PIC-NEXT:  movq %eax, %rdx
     ; PIC-NEXT:  callq __xray_TypedEvent at PLT
     ; PIC-NEXT:  popq %rdx
     ; PIC-NEXT:  popq %rsi


        


More information about the llvm-commits mailing list