1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
3 ; RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -global-isel -code-model=small \
4 ; RUN: -verify-machineinstrs -o - < %s | FileCheck %s --check-prefix=SMALL
5 ; RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -global-isel -code-model=medium \
6 ; RUN: -verify-machineinstrs -o - < %s | FileCheck %s --check-prefix=MEDIUM
7 ; RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -global-isel -code-model=large \
8 ; RUN: -verify-machineinstrs -o - < %s | FileCheck %s --check-prefix=LARGE
10 define float @foo_float() {
11 ; SMALL-LABEL: foo_float:
12 ; SMALL: # %bb.0: # %entry
13 ; SMALL-NEXT: ld 3, .LC0@toc(2)
14 ; SMALL-NEXT: lfs 1, 0(3)
17 ; MEDIUM-LABEL: foo_float:
18 ; MEDIUM: # %bb.0: # %entry
19 ; MEDIUM-NEXT: addis 3, 2, .LCPI0_0@toc@ha
20 ; MEDIUM-NEXT: addi 3, 3, .LCPI0_0@toc@l
21 ; MEDIUM-NEXT: lfs 1, 0(3)
24 ; LARGE-LABEL: foo_float:
25 ; LARGE: # %bb.0: # %entry
26 ; LARGE-NEXT: addis 3, 2, .LC0@toc@ha
27 ; LARGE-NEXT: ld 3, .LC0@toc@l(3)
28 ; LARGE-NEXT: lfs 1, 0(3)
31 ret float 1.000000e+00
34 define double @foo_double() {
35 ; SMALL-LABEL: foo_double:
36 ; SMALL: # %bb.0: # %entry
37 ; SMALL-NEXT: ld 3, .LC1@toc(2)
38 ; SMALL-NEXT: lfd 1, 0(3)
41 ; MEDIUM-LABEL: foo_double:
42 ; MEDIUM: # %bb.0: # %entry
43 ; MEDIUM-NEXT: addis 3, 2, .LCPI1_0@toc@ha
44 ; MEDIUM-NEXT: addi 3, 3, .LCPI1_0@toc@l
45 ; MEDIUM-NEXT: lfd 1, 0(3)
48 ; LARGE-LABEL: foo_double:
49 ; LARGE: # %bb.0: # %entry
50 ; LARGE-NEXT: addis 3, 2, .LC1@toc@ha
51 ; LARGE-NEXT: ld 3, .LC1@toc@l(3)
52 ; LARGE-NEXT: lfd 1, 0(3)
55 ret double 1.000000e+00