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

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 15 21:12:13 PDT 2024


================
@@ -0,0 +1,19 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
+; RUN: opt < %s -passes='sroa' -S | FileCheck %s
+
+define float @atomic_vector() {
+; CHECK-LABEL: define float @atomic_vector() {
+; CHECK-NEXT:    [[TMP1:%.*]] = alloca <1 x float>, align 4
+; CHECK-NEXT:    store <1 x float> undef, ptr [[TMP1]], align 4
+; CHECK-NEXT:    [[TMP2:%.*]] = load atomic volatile float, ptr [[TMP1]] acquire, align 4
+; CHECK-NEXT:    ret float [[TMP2]]
+;
+  %1 = alloca <1 x float>
----------------
arsenm wrote:

Use named values in tests 

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


More information about the llvm-commits mailing list