================
@@ -120,12 +144,7 @@ bool RISCVPushPopOpt::runOnMachineFunction(MachineFunction 
&Fn) {
 
   // If Zcmp extension is not supported, abort.
   const RISCVSubtarget *Subtarget = &Fn.getSubtarget<RISCVSubtarget>();
-  if (!Subtarget->hasStdExtZcmp())
-    return false;
-
-  // If frame pointer elimination has been disabled, abort to avoid breaking 
the
-  // ABI.
-  if (Fn.getTarget().Options.DisableFramePointerElim(Fn))
----------------
lenary wrote:

This was an optimisation for the pass. Before, Push/Pop instructions wouldn't 
have been introduced if there was a frame pointer, as I understand.

Now, Xqccmp might introduce some push/pop instructions if there's a frame 
pointer, which is fine but needs this check not to exist so we can actually 
look at the instructions we want.

Maybe I should add a check that the pop has a framedestroy flag, as some kind 
of check that it's part of the prolog/epilog?

https://github.com/llvm/llvm-project/pull/128815
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to