How to reproduce the bug and get the exact IR before crash during bootstrapping?

My PR crashed clang when bootstrapping and compiling flang/lib/Evaluate/intrinsics-library.cpp on buildbot clang-aarch64-sve-vls-2stage.

It’s hard for my x86 machine to cross-compile the AArch64 version of clang. And I didn’t find any way to get the IR before crash with CMake Building Configuration. Therefore, I can’t even pinpoint the problem.

I’ll highly appreciate it if anyone could provide me with guidance or share similar experience.

We (Linaro) run that bot, in future if you want to ping us you can use the email listed on the “Worker” tab as “admin”. Or CC us on the build notification email, whatever you prefer.

Anyway, since it’s been a while those reproducer files have been wiped. I will do a build myself and get them for you.

It may not matter that the stage 1 clang is running on AArch64, simply that it contains your change at all, and given the right target options it’ll fail the same way. Seems like likely given the assert is about vectors.

1 Like

Excuse the Drive link, file uploads are size and kind restricted here: intrinsics-library-eb6adb.zip - Google Drive

Let me know if that works for you.

The full callstack too: callstack.txt (10.6 KB)

I don’t have an x86 build handy right now, but I’ll see if it reproduces on a non-SVE machine. That’s usually a good sign.

Some details about the compilation flags, if you aren’t familiar with SVE:

  • This is “VLS” aka vector length specific, fixed size vectors. As opposed to the other “VLA” vector length agnostic aka sizeless vector code.
  • -mcpu=neoverse-512tvb tells it how best to use the resources for the Graviton 3 this runs on.
  • -msve-vector-bits=256 means we’re targeting fixed size vectors with 256 bit width.
  • -mllvm -treat-scalable-fixed-error-as-warning=false I forget what this does exactly, but shouldn’t be an issue here.
1 Like

It does. So I expect that a stage 1 x86 build of clang will also fail given the options in the reproducer.

1 Like

Thanks for your help! I’ve reproduced it successfully. It’ll take some time for me to get IR before SLPVectorizer and reduce it.

1 Like

An issue has been sent : https://github.com/llvm/llvm-project/issues/68953