[llvm] [RISCV] Teach RISCVMakeCompressible handle Zca/Zcf/Zce/Zcd. (PR #81844)

Yeting Kuo via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 21 22:07:19 PST 2024


================
@@ -324,8 +340,7 @@ bool RISCVMakeCompressibleOpt::runOnMachineFunction(MachineFunction &Fn) {
   const RISCVInstrInfo &TII = *STI.getInstrInfo();
 
   // This optimization only makes sense if compressed instructions are emitted.
-  // FIXME: Support Zca, Zcf, Zcd granularity.
-  if (!STI.hasStdExtC())
+  if (!STI.hasStdExtZca() && !STI.hasStdExtCOrZcfOrZce() && !STI.hasStdExtZcd())
----------------
yetingk wrote:

I think you are right.

https://github.com/llvm/llvm-project/pull/81844


More information about the llvm-commits mailing list