[llvm] [SROA] Prevent load atomic vector from being generated (PR #112432)

via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 15 13:54:28 PDT 2024


================
@@ -0,0 +1,19 @@
+; RUN: opt < %s -passes='sroa' -S 2>&1 | FileCheck %s --check-prefix=ERR
+; RUN: opt < %s -passes='sroa' -S | FileCheck %s
+
+define float @atomic_vector() {
+; ERR-NOT: atomic load operand must have integer, pointer, or floating point type!
+; ERR-NOT:   <1 x float>  {{%.*}} = load atomic volatile <1 x float>, ptr {{%.*}} acquire, align 4
----------------
jofrn wrote:

Hm, right, since the IR sequence will either match or not. However, the error is illustrative of the actual issue, so I'm not sure if we should remove it.

https://github.com/llvm/llvm-project/pull/112432


More information about the llvm-commits mailing list