1 ; RUN: llc -mcpu=pwr7 -O1 -code-model=medium <%s | FileCheck %s 2 3 ; Test peephole optimization for medium code model (32-bit TOC offsets) 4 ; for loading a value from the constant pool (TOC-relative). 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 define double @test_double_const() nounwind { 10 entry: 11 ret double 0x3F4FD4920B498CF0 12 } 13 14 ; CHECK: [[VAR:[a-z0-9A-Z_.]+]]: 15 ; CHECK: .quad 4562098671269285104 16 ; CHECK-LABEL: test_double_const: 17 ; CHECK: addis [[REG1:[0-9]+]], 2, [[VAR]]@toc@ha 18 ; CHECK: lfd {{[0-9]+}}, [[VAR]]@toc@l([[REG1]]) 19