xref: /llvm-project/llvm/test/Transforms/GlobalOpt/ARM/arm-widen-non-const-global.ll (revision e37d736def5b95a2710f92881b5fc8b0494d8a05)
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
2; RUN: opt < %s -mtriple=arm-none-eabi -passes=globalopt -S | FileCheck %s
3
4@.str = unnamed_addr global [3 x i8] c"12\00", align 1
5
6define  void @foo()  {
7; CHECK-LABEL: define void @foo() local_unnamed_addr {
8; CHECK-NEXT:  [[ENTRY:.*:]]
9; CHECK-NEXT:    [[SOMETHING:%.*]] = alloca [3 x i8], align 1
10; CHECK-NEXT:    call void @llvm.memcpy.p0.p0.i32(ptr noundef nonnull align 1 dereferenceable(3) [[SOMETHING]], ptr noundef nonnull align 1 dereferenceable(3) @.str, i32 3, i1 false)
11; CHECK-NEXT:    [[CALL1:%.*]] = call i32 @bar(ptr nonnull [[SOMETHING]])
12; CHECK-NEXT:    ret void
13;
14entry:
15  %something = alloca [3 x i8], align 1
16  call void @llvm.memcpy.p0.p0.i32(ptr noundef nonnull align 1 dereferenceable(3) %something, ptr noundef nonnull align 1 dereferenceable(3) @.str, i32 3, i1 false)
17  %call1 = call i32 @bar(ptr nonnull %something)
18  ret void
19}
20
21declare i32 @bar(...)
22