[PATCH] D129208: [MachineVerifier] Try harder to verify LiveIntervals

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 12 03:37:39 PDT 2022


foad added inline comments.


================
Comment at: llvm/test/CodeGen/AMDGPU/si-lower-control-flow.mir:33
   ; GCN-NEXT:   [[S_AND_B64_:%[0-9]+]]:sreg_64 = S_AND_B64 [[COPY]], undef %1:sreg_64, implicit-def dead $scc
-  ; GCN-NEXT:   [[S_XOR_B64_:%[0-9]+]]:sreg_64 = S_XOR_B64 [[S_AND_B64_]], [[COPY]], implicit-def dead $scc
-  ; GCN-NEXT:   $exec = S_MOV_B64_term killed [[S_AND_B64_]]
+  ; GCN-NEXT:   dead %0:sreg_64 = S_XOR_B64 [[S_AND_B64_]], [[COPY]], implicit-def dead $scc
+  ; GCN-NEXT:   $exec = S_MOV_B64_term [[S_AND_B64_]]
----------------
foad wrote:
> This is a side effect of LiveIntervals being available when SILowerControlFlow runs.
> 
> SILowerControlFlow says:
> ```
>   // This doesn't actually need LiveIntervals, but we can preserve them.
>   LIS = getAnalysisIfAvailable<LiveIntervals>();
> ```
> but in fact the presence of LiveIntervals does affect the output as shown by these diffs, so the perhaps the pass should call AU.addUsedIfAvailable<LiveIntervals>() in its getAnalysisUsage?
Done in D129555.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129208/new/

https://reviews.llvm.org/D129208



More information about the llvm-commits mailing list