[PATCH] D150559: [AArch64] Add implicit uses to speculative hardening MIR test

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 15 05:24:57 PDT 2023


foad created this revision.
foad added reviewers: arsenm, RKSimon, bogner, t.p.northover.
Herald added subscribers: StephenFan, kristof.beyls.
Herald added a project: All.
foad requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.

A couple of tests were setting liveins to add fake live registers, but
that only works if you track liveness forwards. Add some implicit uses
too, so that it also works if you track liveness backwards.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D150559

Files:
  llvm/test/CodeGen/AArch64/speculation-hardening.mir


Index: llvm/test/CodeGen/AArch64/speculation-hardening.mir
===================================================================
--- llvm/test/CodeGen/AArch64/speculation-hardening.mir
+++ llvm/test/CodeGen/AArch64/speculation-hardening.mir
@@ -171,7 +171,7 @@
     ; CHECK-NEXT:       mov sp, x1
     ; CHECK-NEXT:       blr x30
     liveins: $x0, $lr
-    BLR killed renamable $lr, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def $w0
+    BLR killed renamable $lr, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def $w0, implicit $x0
     $w0 = nsw ADDWri killed $w0, 1, 0
     RET undef $lr, implicit $w0
 ...
@@ -197,6 +197,6 @@
     ; CHECK-NEXT:  csetm x16, ne
     ; CHECK-NEXT:  ret
     liveins: $x0, $x1, $x2, $x3, $x4, $x5, $x6, $x7, $x8, $x9, $x10, $x11, $x12, $x13, $x14, $x15, $x17, $x18, $x19, $x20, $x21, $x22, $x23, $x24, $x25, $x26, $x27, $x28, $fp, $lr
-     $x0 = LDRXui killed $x0, 0
-     RET undef $lr, implicit $x0
+    $x0 = LDRXui killed $x0, 0
+    RET $lr, implicit $x0, implicit $x1, implicit $x2, implicit $x3, implicit $x4, implicit $x5, implicit $x6, implicit $x7, implicit $x8, implicit $x9, implicit $x10, implicit $x11, implicit $x12, implicit $x13, implicit $x14, implicit $x15, implicit $x17, implicit $x18, implicit $x19, implicit $x20, implicit $x21, implicit $x22, implicit $x23, implicit $x24, implicit $x25, implicit $x26, implicit $x27, implicit $x28
 ...


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150559.522131.patch
Type: text/x-patch
Size: 1434 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230515/75c52dcc/attachment.bin>


More information about the llvm-commits mailing list