1*9880d681SAndroid Build Coastguard Worker; RUN: llc -O0 < %s | FileCheck %s 2*9880d681SAndroid Build Coastguard Worker 3*9880d681SAndroid Build Coastguard Worker; Verify that a constant with an initializer that may turn into a dynamic 4*9880d681SAndroid Build Coastguard Worker; relocation is not placed in .rodata, but rather in .data.rel.ro. 5*9880d681SAndroid Build Coastguard Worker 6*9880d681SAndroid Build Coastguard Workertarget datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128-v128:128:128-n32:64" 7*9880d681SAndroid Build Coastguard Workertarget triple = "powerpc64-unknown-linux-gnu" 8*9880d681SAndroid Build Coastguard Worker 9*9880d681SAndroid Build Coastguard Worker%struct.x = type { i64 (i8*, i64, i64, %struct._IO_FILE*)* } 10*9880d681SAndroid Build Coastguard Worker%struct._IO_FILE = type { i32, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, %struct._IO_marker*, %struct._IO_FILE*, i32, i32, i64, i16, i8, [1 x i8], i8*, i64, i8*, i8*, i8*, i8*, i64, i32, [20 x i8] } 11*9880d681SAndroid Build Coastguard Worker%struct._IO_marker = type { %struct._IO_marker*, %struct._IO_FILE*, i32 } 12*9880d681SAndroid Build Coastguard Worker 13*9880d681SAndroid Build Coastguard Worker@_ZL1y = internal constant %struct.x { i64 (i8*, i64, i64, %struct._IO_FILE*)* @fread }, align 8 14*9880d681SAndroid Build Coastguard Worker 15*9880d681SAndroid Build Coastguard Worker; Function Attrs: nounwind 16*9880d681SAndroid Build Coastguard Workerdefine %struct.x* @_Z3foov() #0 { 17*9880d681SAndroid Build Coastguard Workerentry: 18*9880d681SAndroid Build Coastguard Worker ret %struct.x* @_ZL1y 19*9880d681SAndroid Build Coastguard Worker} 20*9880d681SAndroid Build Coastguard Worker 21*9880d681SAndroid Build Coastguard Workerdeclare i64 @fread(i8*, i64, i64, %struct._IO_FILE*) #1 22*9880d681SAndroid Build Coastguard Worker 23*9880d681SAndroid Build Coastguard Worker; CHECK: .section .data.rel.ro 24*9880d681SAndroid Build Coastguard Worker; CHECK: .quad fread 25*9880d681SAndroid Build Coastguard Worker 26*9880d681SAndroid Build Coastguard Workerattributes #0 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="false" "use-soft-float"="false" } 27*9880d681SAndroid Build Coastguard Workerattributes #1 = { "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="false" "use-soft-float"="false" } 28