brintos

brintos / llvm-project-archived public Read only

0
0
Text · 997 B · c9ccdc7 Raw
29 lines · plain
1;; The same as index-const-prop-gvref.ll, except for PIE.2; RUN: opt -module-summary %s -o %t1.bc3; RUN: opt -module-summary %p/Inputs/index-const-prop-gvref.ll -o %t2.bc4; RUN: llvm-lto2 run -save-temps %t2.bc -r=%t2.bc,b,pl -r=%t2.bc,a,pl \5; RUN:   %t1.bc -r=%t1.bc,main,plx -r=%t1.bc,a, -r=%t1.bc,b, -o %t36; RUN: llvm-dis %t3.2.3.import.bc -o - | FileCheck %s --check-prefix=DEST7 8;; For PIE, keep dso_local for declarations to enable direct access.9; DEST:      @b = external dso_local global ptr10; DEST-NEXT: @a = available_externally dso_local global i32 42, align 411 12target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"13target triple = "x86_64-unknown-linux-gnu"14 15@a = external global i3216@b = external global ptr17 18define i32 @main() {19  %p = load ptr, ptr @b, align 820  store i32 33, ptr %p, align 421  %v = load i32, ptr @a, align 422  ret i32 %v23}24 25!llvm.module.flags = !{!0}26 27!0 = !{i32 7, !"PIE Level", i32 2}28!1 = !{i32 7, !"PIC Level", i32 2}29