[PATCH] D90935: [ARM][LowOverheadLoops] Merge VCMP and VPST across VPT blocks

Sam Tebbs via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 17 03:20:20 PST 2020


samtebbs added inline comments.


================
Comment at: llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp:1620
+          // If the instruction after the VCMP is predicated then a different code path is expected to have merged the VCMP and VPST already. This assertion protects against changed to that behaviour
+          assert(!IntermediateInstrsUseVPR && "Instructions between the VCMP and VPST are not expected to be predicated");
+          ReplaceVCMPWithVPT(VCMP, VPST);
----------------
dmgreen wrote:
> Is it possible to have:
> ```
> VPST
> VORR vpr
> VCMP vpr
> ..
> VPST
> VORR vpr
> ..
> VPST
> VORR vpr
> ```
> And would this attempt to fold the VCMP into the last vptblock? Do we have a test for that case?
> 
This becomes
```
VORR
VPT
VORR vpr
VPST
VORR vpr
```
And I have added a test case for this.


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

https://reviews.llvm.org/D90935



More information about the llvm-commits mailing list