1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 18:42:46 +02:00
llvm-mirror/test/Transforms/SCCP/definite-initializer.ll
David Majnemer fb412dedc3 [IPSCCP] Guard a user of getInitializer with hasDefinitiveInitializer
We are not allowed to reason about an initializer value without first
consulting hasDefinitiveInitializer.

llvm-svn: 309594
2017-07-31 17:47:07 +00:00

12 lines
318 B
LLVM

; RUN: opt -S -ipsccp < %s | FileCheck %s
@d = internal externally_initialized global i32 0, section ".openbsd.randomdata", align 4
; CHECK-LABEL: @test1(
define i32 @test1() {
entry:
%load = load i32, i32* @d, align 4
ret i32 %load
; CHECK: %[[load:.*]] = load i32, i32* @d, align 4
; CHECK: ret i32 %[[load]]
}