[llvm] [SROA] Prevent load atomic vector from being generated (PR #112432)
Shilei Tian via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 15 13:48:51 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
----------------
shiltian wrote:
It might not be necessary to check the error. It is sufficient to just check IR sequence. You will probably want to auto generate the check lines as well, which could make others life much easier in the future.
https://github.com/llvm/llvm-project/pull/112432
More information about the llvm-commits
mailing list