[llvm] 5b524da - [InstCombine] Add test for unused atomic load from non-constant global (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 29 06:08:54 PDT 2022
Author: Nikita Popov
Date: 2022-04-29T15:08:37+02:00
New Revision: 5b524da42f6817920eb1f1dd30f8a2dc3241d614
URL: https://github.com/llvm/llvm-project/commit/5b524da42f6817920eb1f1dd30f8a2dc3241d614
DIFF: https://github.com/llvm/llvm-project/commit/5b524da42f6817920eb1f1dd30f8a2dc3241d614.diff
LOG: [InstCombine] Add test for unused atomic load from non-constant global (NFC)
Added:
Modified:
llvm/test/Transforms/InstCombine/atomic.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/InstCombine/atomic.ll b/llvm/test/Transforms/InstCombine/atomic.ll
index ef838e735312..ec79891af11e 100644
--- a/llvm/test/Transforms/InstCombine/atomic.ll
+++ b/llvm/test/Transforms/InstCombine/atomic.ll
@@ -422,6 +422,7 @@ define void @no_atomic_vector_store(<2 x float> %p, i8* %p2) {
}
@c = constant i32 42
+ at g = global i32 42
define i32 @atomic_load_from_constant_global() {
; CHECK-LABEL: @atomic_load_from_constant_global(
@@ -441,6 +442,15 @@ define i8 @atomic_load_from_constant_global_bitcast() {
ret i8 %v
}
+define void @atomic_load_from_non_constant_global() {
+; CHECK-LABEL: @atomic_load_from_non_constant_global(
+; CHECK-NEXT: [[TMP1:%.*]] = load atomic i32, i32* @g seq_cst, align 4
+; CHECK-NEXT: ret void
+;
+ load atomic i32, i32* @g seq_cst, align 4
+ ret void
+}
+
define void @volatile_load_from_constant_global() {
; CHECK-LABEL: @volatile_load_from_constant_global(
; CHECK-NEXT: [[TMP1:%.*]] = load volatile i32, i32* @c, align 4
More information about the llvm-commits
mailing list