| ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 3 | |
| ; RUN: opt -S -passes=globalopt < %s | FileCheck %s | |
| target datalayout = "A5-G1" | |
| ; Check that we don't convert the global into an alloca if their respective address | |
| ; spaces differ, and the alloca addrspace is non-zero. | |
| @x = internal global i32 poison | |
| ; Function Attrs: norecurse | |
| define void @test(i32 %0) #0 { | |
| ; CHECK-LABEL: define void @test( | |
| ; CHECK-SAME: i32 [[TMP0:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] { | |
| ; CHECK-NEXT: entry: | |
| ; CHECK-NEXT: ret void | |
| ; | |
| entry: | |
| store i32 %0, ptr @x, align 4 | |
| ret void | |
| } | |
| attributes #0 = { norecurse } |