[llvm] [SLP]Initial support for (masked)loads + compress and (masked)interleaved (PR #132099)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 16 03:39:56 PDT 2025
alexey-bataev wrote:
> > > The assertion failure happens elsewhere, but the issue is triggered by this commit.
> >
> >
> > #135821 A bug in the AARCH664 codegen
>
> Thanks for proper routing! Unfortunately, this is a distinct problem from the one reported in [#134578 (comment)](https://github.com/llvm/llvm-project/pull/134578#issuecomment-2798417089). I'm still trying to figure out, what's happening, and I don't have any good ideas.
>
> In the meantime I reduced the IR that crashes the Clang built with the instrumented profile gathered from Clang running on a number of our internal compilations:
>
> ```
> target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
> target triple = "x86_64-unknown-linux-gnu"
>
> define void @g(ptr %0) #0 {
> call void @f(ptr %0, ptr %0)
> ret void
> }
>
> define void @f(ptr %0, ptr %1) {
> %3 = load i32, ptr %0, align 4
> call void @store32(ptr %0, i32 %3)
> %4 = getelementptr i8, ptr %0, i64 4
> %5 = getelementptr i8, ptr %1, i64 4
> %6 = load i32, ptr %5, align 4
> call void @store32(ptr %4, i32 %6)
> %7 = getelementptr i8, ptr %0, i64 8
> %8 = getelementptr i8, ptr %1, i64 8
> %9 = load i32, ptr %8, align 4
> call void @store32(ptr %7, i32 %9)
> %10 = getelementptr i8, ptr %0, i64 12
> %11 = getelementptr i8, ptr %1, i64 12
> %12 = load i32, ptr %11, align 4
> call void @store32(ptr %10, i32 %12)
> ret void
> }
>
> define void @store32(ptr %0, i32 %1) {
> %3 = trunc i32 %1 to i8
> store i8 %3, ptr %0, align 1
> %4 = lshr i32 %1, 1
> %5 = trunc i32 %4 to i8
> %6 = getelementptr i8, ptr %0, i64 1
> store i8 %5, ptr %6, align 1
> %7 = lshr i32 %1, 16
> %8 = trunc i32 %7 to i8
> %9 = getelementptr i8, ptr %0, i64 2
> store i8 %8, ptr %9, align 1
> %10 = getelementptr i8, ptr %0, i64 3
> store i8 %5, ptr %10, align 1
> ret void
> }
>
> ; uselistorder directives
> uselistorder ptr @store32, { 3, 2, 1, 0 }
>
> attributes #0 = { "target-features"="+avx" }
> ```
>
> (also here: https://gcc.godbolt.org/z/5n4MEEosn)
>
> Any other clang builds I tried (with asan, msan, assertions) don't crash on this IR though.
I'll try to debug what's going on here
https://github.com/llvm/llvm-project/pull/132099
More information about the llvm-commits
mailing list