[PATCH] D125323: [RISCV] Add the passthru operand for RVV unmasked segment load IR intrinsics.

Wang Pengcheng via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 1 19:44:21 PDT 2022


pcwang-thead added a comment.

In D125323#3550307 <https://reviews.llvm.org/D125323#3550307>, @khchen wrote:

> In D125323#3549794 <https://reviews.llvm.org/D125323#3549794>, @pcwang-thead wrote:
>
>> Is there an easy way to update tests? Or we need to add passthru operands manually? I will appreciate it if you can tell me. :-)
>
> use sed to do replacement.
> ex.
>
>   #!/bin/bash
>   set -x
>   
>   for var in "$@"
>   do
>     sed -i 's/declare {\([^,]\+\),[^,]\+} \(.*\)(\([0-9a-z*]\+\)/declare {\1,\1} \2(\1,\1, \3/g' $var
>     sed -i 's/declare {\([^,]\+\),[^,]\+,[^,]\+} \(.*\)(\([0-9a-z*]\+\)/declare {\1,\1,\1} \2(\1,\1,\1, \3/g' $var
>     sed -i 's/declare {\([^,]\+\),[^,]\+,[^,]\+,[^,]\+} \(.*\)(\([0-9a-z*]\+\)/declare {\1,\1,\1,\1} \2(\1,\1,\1,\1, \3/g' $var
>     sed -i 's/declare {\([^,]\+\),[^,]\+,[^,]\+,[^,]\+,[^,]\+} \(.*\)(\([0-9a-z*]\+\)/declare {\1,\1,\1,\1,\1} \2(\1,\1,\1,\1,\1, \3/g' $var
>     sed -i 's/declare {\([^,]\+\),[^,]\+,[^,]\+,[^,]\+,[^,]\+,[^,]\+} \(.*\)(\([0-9a-z*]\+\)/declare {\1,\1,\1,\1,\1,\1} \2(\1,\1,\1,\1,\1,\1, \3/g' $var
>     sed -i 's/declare {\([^,]\+\),[^,]\+,[^,]\+,[^,]\+,[^,]\+,[^,]\+,[^,]\+} \(.*\)(\([0-9a-z*]\+\)/declare {\1,\1,\1,\1,\1,\1,\1} \2(\1,\1,\1,\1,\1,\1,\1, \3/g' $var
>     sed -i 's/declare {\([^,]\+\),[^,]\+,[^,]\+,[^,]\+,[^,]\+,[^,]\+,[^,]\+,[^,]\+} \(.*\)(\([0-9a-z*]\+\)/declare {\1,\1,\1,\1,\1,\1,\1,\1} \2(\1,\1,\1,\1,\1,\1,\1,\1, \3/g' $var
>     sed -i 's/call {\([^,]\+\),[^,]\+} \(.*\)(\([0-9a-z*]\+\)/call {\1,\1} \2(\1 undef, \1 undef, \3/g' $var
>     sed -i 's/call {\([^,]\+\),[^,]\+,[^,]\+} \(.*\)(\([0-9a-z*]\+\)/call {\1,\1,\1} \2(\1 undef, \1 undef, \1 undef, \3/g' $var
>     sed -i 's/call {\([^,]\+\),[^,]\+,[^,]\+,[^,]\+} \(.*\)(\([0-9a-z*]\+\)/call {\1,\1,\1,\1} \2(\1 undef, \1 undef, \1 undef, \1 undef, \3/g' $var
>     sed -i 's/call {\([^,]\+\),[^,]\+,[^,]\+,[^,]\+,[^,]\+} \(.*\)(\([0-9a-z*]\+\)/call {\1,\1,\1,\1,\1} \2(\1 undef, \1 undef, \1 undef, \1 undef, \1 undef, \3/g' $var
>     sed -i 's/call {\([^,]\+\),[^,]\+,[^,]\+,[^,]\+,[^,]\+,[^,]\+} \(.*\)(\([0-9a-z*]\+\)/call {\1,\1,\1,\1,\1,\1} \2(\1 undef, \1 undef, \1 undef, \1 undef, \1 undef, \1 undef, \3/g' $var
>     sed -i 's/call {\([^,]\+\),[^,]\+,[^,]\+,[^,]\+,[^,]\+,[^,]\+,[^,]\+} \(.*\)(\([0-9a-z*]\+\)/call {\1,\1,\1,\1,\1,\1,\1} \2(\1 undef, \1 undef, \1 undef, \1 undef, \1 undef, \1 undef, \1 undef, \3/g' $var
>     sed -i 's/call {\([^,]\+\),[^,]\+,[^,]\+,[^,]\+,[^,]\+,[^,]\+,[^,]\+,[^,]\+} \(.*\)(\([0-9a-z*]\+\)/call {\1,\1,\1,\1,\1,\1,\1,\1} \2(\1 undef, \1 undef ,\1 undef ,\1 undef, \1 undef ,\1 undef, \1 undef, \1 undef, \
>   3/g' $var
>   done

Thanks!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125323



More information about the cfe-commits mailing list