https://llvm.org/bugs/show_bug.cgi?id=23737

            Bug ID: 23737
           Summary: SROA replaces atomic volatile load with volatile load
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Scalar Optimizations
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

consider:
target triple = "x86_64-pc-linux"

define void @f(i64** %x) {
entry:
  %ptr = alloca i64, align 8
  store i64 0, i64* %ptr, align 8
  %load = load atomic volatile i64, i64* %ptr seq_cst, align 8
  ret void
}

running -sroa results in:
target triple = "x86_64-pc-linux"

define void @f(i64** %x) {
entry:
  %ptr = alloca i64, align 8
  store i64 0, i64* %ptr, align 8
  %ptr.0.load = load volatile i64, i64* %ptr, align 8
  ret void
}

This doesn't seem correct.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to