[PATCH] D127680: [BasicTTI] Allow generic handling of scalable vector fshr/fshl

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 15 16:29:44 PDT 2022


craig.topper added a comment.

In D127680#3583308 <https://reviews.llvm.org/D127680#3583308>, @reames wrote:

> In D127680#3581448 <https://reviews.llvm.org/D127680#3581448>, @david-arm wrote:
>
>> I suspect we were just being overly conservative at the time when fixing up some FixedVectorType casts, but as you say it seems to work now. Would you be able to add a similar Analysis/CostModel/AArch64/sve-intrinsics.ll test as well for the <vscale x 4 x i32> case?
>
> @david-arm It's not really clear which test you want me to add.  Since this isn't fixing a crash, could you just land what you have in mind and I'll rebase this over?

I think the request is to add these to sve-intrinsics.ll

define void @fshr(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b, <vscale x 4 x i32> %c) {

  call <vscale x 4 x i32> @llvm.fshr.nxv4i32(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b, <vscale x 4 x i32> %c)
  ret void

}

define void @fshl(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b, <vscale x 4 x i32> %c) {

  call <vscale x 4 x i32> @llvm.fshl.nxv4i32(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b, <vscale x 1 x i32> %c)
  ret void

}



================
Comment at: llvm/test/Analysis/CostModel/RISCV/rvv-intrinsics.ll:39
 ;
   call <vscale x 1 x i32> @llvm.fshr.v4i32(<vscale x 1 x i32> %a, <vscale x 1 x i32> %b, <vscale x 1 x i32> %c)
   ret void
----------------
This should be llvm.fshr.nxv1i32. The instrinsic parser is lax about checking the type part of the string.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127680



More information about the llvm-commits mailing list