File: fp128-load.ll

package info (click to toggle)
llvm-toolchain-17 1%3A17.0.6-22
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,799,624 kB
  • sloc: cpp: 6,428,607; ansic: 1,383,196; asm: 793,408; python: 223,504; objc: 75,364; f90: 60,502; lisp: 33,869; pascal: 15,282; sh: 9,684; perl: 7,453; ml: 4,937; awk: 3,523; makefile: 2,889; javascript: 2,149; xml: 888; fortran: 619; cs: 573
file content (39 lines) | stat: -rw-r--r-- 1,429 bytes parent folder | download | duplicates (13)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -O2 -mtriple=x86_64-linux-android -mattr=+mmx \
; RUN:     -enable-legalize-types-checking | FileCheck %s
; RUN: llc < %s -O2 -mtriple=x86_64-linux-gnu -mattr=+mmx \
; RUN:     -enable-legalize-types-checking | FileCheck %s

; __float128 myFP128 = 1.0L;  // x86_64-linux-android
@my_fp128 = dso_local global fp128 0xL00000000000000003FFF000000000000, align 16

define fp128 @get_fp128() {
; CHECK-LABEL: get_fp128:
; CHECK:       # %bb.0: # %entry
; CHECK-NEXT:    movaps my_fp128(%rip), %xmm0
; CHECK-NEXT:    retq
entry:
  %0 = load fp128, ptr @my_fp128, align 16
  ret fp128 %0
}

@TestLoadExtend.data = internal unnamed_addr constant [2 x float] [float 0x3FB99999A0000000, float 0x3FC99999A0000000], align 4

define fp128 @TestLoadExtend(fp128 %x, i32 %n) {
; CHECK-LABEL: TestLoadExtend:
; CHECK:       # %bb.0: # %entry
; CHECK-NEXT:    movslq %edi, %rax
; CHECK-NEXT:    movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
; CHECK-NEXT:    jmp __extendsftf2@PLT # TAILCALL
entry:
  %idxprom = sext i32 %n to i64
  %arrayidx = getelementptr inbounds [2 x float], ptr @TestLoadExtend.data, i64 0, i64 %idxprom
  %0 = load float, ptr %arrayidx, align 4
  %conv = fpext float %0 to fp128
  ret fp128 %conv
}

; CHECK-LABEL:  my_fp128:
; CHECK-NEXT:  .quad   0x0
; CHECK-NEXT:  .quad   0x3fff000000000000
; CHECK-NEXT:  .size   my_fp128, 16