[llvm] [SLP]Initial non-power-of-2 (but still whole register) for remaining nodes (PR #113356)
Sushant Gokhale via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 12 21:25:57 PST 2025
sushgokh wrote:
@alexey-bataev you might also want to consider this example:
```
define <6 x double> @load_6xdouble(ptr %a)
{
entry:
%1 = load double, ptr %a, align 8
%2 = getelementptr double, ptr %a, i16 1
%3 = load double, ptr %2, align 8
%4 = getelementptr double, ptr %a, i16 2
%5 = load double, ptr %4, align 8
%6 = getelementptr double, ptr %a, i16 3
%7 = load double, ptr %6, align 8
%8 = getelementptr double, ptr %a, i16 4
%9 = load double, ptr %8, align 8
%10 = getelementptr double, ptr %a, i16 5
%11 = load double, ptr %10, align 8
%12 = insertelement <6 x double> poison, double %1, i32 0
%13 = insertelement <6 x double> %12, double %3, i32 1
%14 = insertelement <6 x double> %13, double %5, i32 2
%15 = insertelement <6 x double> %14, double %7, i32 3
%16 = insertelement <6 x double> %15, double %9, i32 4
%17 = insertelement <6 x double> %16, double %11, i32 5
ret <6 x double> %17
}
```
ToT output:
```
define <6 x double> @load_6xdouble(ptr %a) {
entry:
%0 = load <4 x double>, ptr %a, align 8
%1 = getelementptr double, ptr %a, i16 4
%2 = load <2 x double>, ptr %1, align 8
%3 = shufflevector <4 x double> %0, <4 x double> poison, <6 x i32> <i32 0, i32 1, i32 2, i32 3, i32 poison, i32 poison>
%4 = shufflevector <2 x double> %2, <2 x double> poison, <6 x i32> <i32 0, i32 1, i32 poison, i32 poison, i32 poison, i32 poison>
%5 = shufflevector <6 x double> %3, <6 x double> %4, <6 x i32> <i32 0, i32 1, i32 2, i32 3, i32 6, i32 7>
ret <6 x double> %5
}
```
Expected output:
```
define <6 x double> @load_6xdouble(ptr %a) {
entry:
%0 = load <6 x double>, ptr %a, align 8
ret <6 x double> %0
}
I hope I am not missing out on some issue with not having this
```
https://github.com/llvm/llvm-project/pull/113356
More information about the llvm-commits
mailing list