2020-11-20 17:56:53 +08:00
|
|
|
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
[legalize-types] Remove stale entries from SoftenedFloats.
Summary:
When replacing a SDValue, we should remove the replaced value from
SoftenedFloats (and possibly the other maps as well?).
When we revisit a Node because it needs analyzing again, we have to
remove all result values from SoftenedFloats (and possibly other maps?).
This fixes the fp128 test failures with expensive checks for X86.
I think we probably should also remove the values from the other maps
(PromotedIntegers and so on), let me know what you think.
Reviewers: baldrick, bogner, davidxl, ab, arsenm, pirama, chh, RKSimon
Reviewed By: chh
Subscribers: danalbert, wdng, srhines, hfinkel, sepavloff, llvm-commits
Differential Revision: https://reviews.llvm.org/D29265
llvm-svn: 296964
2017-03-04 20:00:35 +08:00
|
|
|
; 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
|
2015-12-15 06:08:36 +08:00
|
|
|
|
|
|
|
; __float128 myFP128 = 1.0L; // x86_64-linux-android
|
2020-12-31 06:40:50 +08:00
|
|
|
@my_fp128 = dso_local global fp128 0xL00000000000000003FFF000000000000, align 16
|
2015-12-15 06:08:36 +08:00
|
|
|
|
|
|
|
define fp128 @get_fp128() {
|
2020-11-20 17:56:53 +08:00
|
|
|
; CHECK-LABEL: get_fp128:
|
|
|
|
; CHECK: # %bb.0: # %entry
|
|
|
|
; CHECK-NEXT: movaps {{.*}}(%rip), %xmm0
|
|
|
|
; CHECK-NEXT: retq
|
2015-12-15 06:08:36 +08:00
|
|
|
entry:
|
|
|
|
%0 = load fp128, fp128* @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) {
|
2020-11-20 17:56:53 +08:00
|
|
|
; CHECK-LABEL: TestLoadExtend:
|
|
|
|
; CHECK: # %bb.0: # %entry
|
|
|
|
; CHECK-NEXT: movslq %edi, %rax
|
|
|
|
; CHECK-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
|
2020-12-17 15:59:30 +08:00
|
|
|
; CHECK-NEXT: jmp __extendsftf2@PLT # TAILCALL
|
2015-12-15 06:08:36 +08:00
|
|
|
entry:
|
|
|
|
%idxprom = sext i32 %n to i64
|
|
|
|
%arrayidx = getelementptr inbounds [2 x float], [2 x float]* @TestLoadExtend.data, i64 0, i64 %idxprom
|
|
|
|
%0 = load float, float* %arrayidx, align 4
|
|
|
|
%conv = fpext float %0 to fp128
|
|
|
|
ret fp128 %conv
|
|
|
|
}
|
|
|
|
|
|
|
|
; CHECK-LABEL: my_fp128:
|
2020-02-07 00:12:10 +08:00
|
|
|
; CHECK-NEXT: .quad 0x0
|
|
|
|
; CHECK-NEXT: .quad 0x3fff000000000000
|
2015-12-15 06:08:36 +08:00
|
|
|
; CHECK-NEXT: .size my_fp128, 16
|