[llvm] 3404127 - [GlobalOpt] Regenerate test checks (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 11 06:34:42 PST 2022
Author: Nikita Popov
Date: 2022-01-11T15:34:34+01:00
New Revision: 3404127b4e9d68b4cb654b5d798e276064ded295
URL: https://github.com/llvm/llvm-project/commit/3404127b4e9d68b4cb654b5d798e276064ded295
DIFF: https://github.com/llvm/llvm-project/commit/3404127b4e9d68b4cb654b5d798e276064ded295.diff
LOG: [GlobalOpt] Regenerate test checks (NFC)
Added:
Modified:
llvm/test/Transforms/GlobalOpt/stored-once-value-type.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/GlobalOpt/stored-once-value-type.ll b/llvm/test/Transforms/GlobalOpt/stored-once-value-type.ll
index c4d5b46ccd332..a0b0e6c1be011 100644
--- a/llvm/test/Transforms/GlobalOpt/stored-once-value-type.ll
+++ b/llvm/test/Transforms/GlobalOpt/stored-once-value-type.ll
@@ -1,20 +1,28 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals
; RUN: opt -passes=globalopt < %s -S | FileCheck %s
; Check that we don't try to set a global initializer to a value of a
diff erent type.
; In this case, we were trying to set @0's initializer to be i32* null.
-%0 = type { i32* }
+%T = type { i32* }
- at 0 = internal global %0* null
-; CHECK: global %0 undef
+ at 0 = internal global %T* null
+;.
+; CHECK: @[[_BODY:[a-zA-Z0-9_$"\\.-]+]] = internal unnamed_addr global [[T:%.*]] undef
+;.
define void @a() {
+; CHECK-LABEL: @a(
+; CHECK-NEXT: store i32* null, i32** getelementptr inbounds ([[T:%.*]], %T* @.body, i64 0, i32 0), align 8
+; CHECK-NEXT: [[TMP1:%.*]] = load atomic i64, i64* bitcast (%T* @.body to i64*) acquire, align 8
+; CHECK-NEXT: ret void
+;
%1 = tail call i8* @_Znwm(i64 8)
- %2 = bitcast i8* %1 to %0*
- %3 = getelementptr inbounds %0, %0* %2, i64 0, i32 0
+ %2 = bitcast i8* %1 to %T*
+ %3 = getelementptr inbounds %T, %T* %2, i64 0, i32 0
store i32* null, i32** %3, align 8
- store i8* %1, i8** bitcast (%0** @0 to i8**), align 8
- %4 = load i64*, i64** bitcast (%0** @0 to i64**), align 8
+ store i8* %1, i8** bitcast (%T** @0 to i8**), align 8
+ %4 = load i64*, i64** bitcast (%T** @0 to i64**), align 8
%5 = load atomic i64, i64* %4 acquire, align 8
ret void
}
More information about the llvm-commits
mailing list