[PATCH] D93286: [RISCV] Define vslideup/vslidedown intrinsics and lower to V instructions.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 16 11:16:26 PST 2020


craig.topper added a comment.

Please upload patches with git diff -U999999 so that we have full context.

If I'm reading the spec correctly, the offset from the scalar register is not truncated to SEW before applying. So that means the ANY_EXTEND we use in LowerINTRINSIC_WO_CHAIN to extend the operand to XLenVT is incorrect for these intrinsics. We would need a ZERO_EXTEND instead. Would it make sense to define these intrinsics as taking an XLen type instead of a scalar type and changing the C intrinsic spec in the same way?



================
Comment at: llvm/include/llvm/IR/IntrinsicsRISCV.td:118
+        : Intrinsic<[llvm_anyvector_ty],
+                    [LLVMMatchType<0>, LLVMMatchType<0>, llvm_any_ty,
+                     llvm_anyint_ty],
----------------
Is the slideup/slidedown type always the same as the element type? Can we use LLVMVectorElementType<0> instead of llvm_any_ty?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D93286



More information about the llvm-commits mailing list