[llvm] [LoongArch] Optimize codegen for ISD::{ROTL,ROTR} (PR #91174)

via llvm-commits llvm-commits at lists.llvm.org
Mon May 6 20:12:32 PDT 2024


================
@@ -79,6 +79,7 @@ LoongArchTargetLowering::LoongArchTargetLowering(const TargetMachine &TM,
   setOperationAction(ISD::SRL_PARTS, GRLenVT, Custom);
   setOperationAction(ISD::FP_TO_SINT, GRLenVT, Custom);
   setOperationAction(ISD::ROTL, GRLenVT, Expand);
+  setOperationAction(ISD::ROTR, GRLenVT, Legal);
----------------
wangleiat wrote:

This operation might be redundant, as `ISD::ROTR` defaults to being legal.

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


More information about the llvm-commits mailing list