[XRay][test] Fix xray-empty-firstmbb.mir and delete incorrect xray-empty-function.mir
authorFangrui Song <maskray@google.com>
Thu, 2 Jan 2020 06:14:33 +0000 (22:14 -0800)
committerFangrui Song <maskray@google.com>
Thu, 2 Jan 2020 06:21:11 +0000 (22:21 -0800)
xray-empty-firstmbb.mir does not test the intended code path. Change
xray-instruction-threshold to 0 to exercise the code path.

Delete xray-empty-function.mir . Empty MachineFunction does not work.
Various passes (e.g. MachineDominatorTree) assume the presence of an
entry block.

llvm/test/CodeGen/X86/xray-empty-firstmbb.mir
llvm/test/CodeGen/X86/xray-empty-function.mir [deleted file]

index 5949a4a..e87c865 100644 (file)
@@ -4,7 +4,7 @@
 
 --- |
 
-  define i32 @foo() noinline uwtable "xray-instruction-threshold"="1" {
+  define i32 @foo() noinline uwtable "xray-instruction-threshold"="0" {
   entry:
     unreachable
   }
diff --git a/llvm/test/CodeGen/X86/xray-empty-function.mir b/llvm/test/CodeGen/X86/xray-empty-function.mir
deleted file mode 100644 (file)
index 178771a..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-# RUN: llc -run-pass xray-instrumentation -mtriple=x86_64-unknown-linux-gnu -o - %s | FileCheck %s
-#
-# Make sure we can handle empty functions.
----
-name: empty
-tracksRegLiveness: true
-liveins:
-  - { reg: '$edi'}
-body:            |
-  bb.0:
-    ; CHECK-NOT: PATCHABLE_FUNCTION_ENTER
-...
-