summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2022-01-11 15:34:16 +0100
committerNikita Popov <npopov@redhat.com>2022-01-11 15:34:34 +0100
commit3404127b4e9d68b4cb654b5d798e276064ded295 (patch)
treed5792b4f983c01eccf96ccca44a31f859c588067
parent8503c688d555014b88849e933bf096035a351586 (diff)
downloadllvm-3404127b4e9d68b4cb654b5d798e276064ded295.tar.gz
[GlobalOpt] Regenerate test checks (NFC)
-rw-r--r--llvm/test/Transforms/GlobalOpt/stored-once-value-type.ll22
1 files changed, 15 insertions, 7 deletions
diff --git a/llvm/test/Transforms/GlobalOpt/stored-once-value-type.ll b/llvm/test/Transforms/GlobalOpt/stored-once-value-type.ll
index c4d5b46ccd33..a0b0e6c1be01 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 different type.
; In this case, we were trying to set @0's initializer to be i32* null.
-%0 = type { i32* }
+%T = type { i32* }
-@0 = internal global %0* null
-; CHECK: global %0 undef
+@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
}