[PATCH] D124631: [TwoAddressInstructionPass] Special processing of STATEPOINT instruction.
Matthias Braun via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 25 16:07:08 PDT 2022
MatzeB accepted this revision.
MatzeB added a comment.
This revision is now accepted and ready to land.
Well I don't have too much experience with `STATEPOINT`s, but the change makes sense to me so far.
Please take another look if you can simplify/shrink the `statepoint-vreg-twoaddr.mir` test so future readers have an easier time.
Either way LGTM.
================
Comment at: llvm/test/CodeGen/X86/statepoint-vreg-twoaddr.mir:6-35
+--- |
+ ; ModuleID = 'statepoint-vreg-twoaddr.ll'
+ source_filename = "statepoint-vreg-twoaddr.ll"
+ target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
+ target triple = "x86_64-pc-linux-gnu"
+
+ declare i1 @return_i1()
----------------
So you need the LLVM-IR here? It feels to me like we can drop it without affecting the test.
================
Comment at: llvm/test/CodeGen/X86/statepoint-vreg-twoaddr.mir:60-70
+ %0:gr64 = COPY killed $rdi
+ ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
+ %1:gr64 = STATEPOINT 0, 0, 0, target-flags(x86-plt) @return_i1, 2, 0, 2, 0, 2, 0, 2, 1, killed %0(tied-def 0), 2, 0, 2, 1, 0, 0, csr_64, implicit-def $rsp, implicit-def $ssp, implicit-def $al
+ ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
+ %2:gr8 = COPY killed $al
+ ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
+ $rdi = COPY killed %1
----------------
Is it possible to further simplify this to focus on the thing being tested? Does the following change work:
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124631/new/
https://reviews.llvm.org/D124631
More information about the llvm-commits
mailing list