| 1 |
; RUN: llc -verify-machineinstrs -O0 < %s | FileCheck %s |
| 2 |
|
| 3 |
; Verify that a constant with an initializer that may turn into a dynamic |
| 4 |
; relocation is not placed in .rodata, but rather in .data.rel.ro. |
| 5 |
|
| 6 |
target 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 |
target triple = "powerpc64-unknown-linux-gnu" |
| 8 |
|
| 9 |
%struct.x = type { ptr } |
| 10 |
%struct._IO_FILE = type { i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i64, i16, i8, [1 x i8], ptr, i64, ptr, ptr, ptr, ptr, i64, i32, [20 x i8] } |
| 11 |
%struct._IO_marker = type { ptr, ptr, i32 } |
| 12 |
|
| 13 |
@_ZL1y = internal constant %struct.x { ptr @fread }, align 8 |
| 14 |
|
| 15 |
; Function Attrs: nounwind |
| 16 |
define ptr @_Z3foov() #0 { |
| 17 |
entry: |
| 18 |
ret ptr @_ZL1y |
| 19 |
} |
| 20 |
|
| 21 |
declare i64 @fread(ptr, i64, i64, ptr) #1 |
| 22 |
|
| 23 |
; CHECK: .section .data.rel.ro |
| 24 |
; CHECK: .quad fread |
| 25 |
|
| 26 |
attributes #0 = { nounwind "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "use-soft-float"="false" } |
| 27 |
attributes #1 = { "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "use-soft-float"="false" } |