2016-07-19 01:20:09 +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 --check-prefix=MMX
|
|
|
|
; RUN: llc < %s -O2 -mtriple=x86_64-linux-gnu -mattr=+mmx \
|
|
|
|
; RUN: -enable-legalize-types-checking | FileCheck %s --check-prefix=MMX
|
|
|
|
; RUN: llc < %s -O2 -mtriple=x86_64-linux-android \
|
|
|
|
; RUN: -enable-legalize-types-checking | FileCheck %s
|
|
|
|
; RUN: llc < %s -O2 -mtriple=x86_64-linux-gnu \
|
|
|
|
; RUN: -enable-legalize-types-checking | FileCheck %s
|
2016-07-19 01:20:09 +08:00
|
|
|
|
|
|
|
define void @test_select(fp128* %p, fp128* %q, i1 zeroext %c) {
|
|
|
|
; MMX-LABEL: test_select:
|
2017-12-05 01:18:51 +08:00
|
|
|
; MMX: # %bb.0:
|
2017-09-19 06:05:35 +08:00
|
|
|
; MMX-NEXT: testl %edx, %edx
|
2016-07-19 01:20:09 +08:00
|
|
|
; MMX-NEXT: jne .LBB0_1
|
2017-12-05 01:18:51 +08:00
|
|
|
; MMX-NEXT: # %bb.2:
|
2016-07-19 01:20:09 +08:00
|
|
|
; MMX-NEXT: movaps {{.*}}(%rip), %xmm0
|
|
|
|
; MMX-NEXT: movaps %xmm0, (%rsi)
|
|
|
|
; MMX-NEXT: retq
|
|
|
|
; MMX-NEXT: .LBB0_1:
|
2018-07-03 01:01:54 +08:00
|
|
|
; MMX-NEXT: movups (%rdi), %xmm0
|
2016-07-19 01:20:09 +08:00
|
|
|
; MMX-NEXT: movaps %xmm0, (%rsi)
|
|
|
|
; MMX-NEXT: retq
|
|
|
|
;
|
|
|
|
; CHECK-LABEL: test_select:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: # %bb.0:
|
2016-07-19 01:20:09 +08:00
|
|
|
; CHECK-NEXT: xorl %eax, %eax
|
2017-09-19 06:05:35 +08:00
|
|
|
; CHECK-NEXT: testl %edx, %edx
|
2016-07-19 01:20:09 +08:00
|
|
|
; CHECK-NEXT: cmovneq (%rdi), %rax
|
|
|
|
; CHECK-NEXT: movabsq $9223231299366420480, %rcx # imm = 0x7FFF800000000000
|
|
|
|
; CHECK-NEXT: cmovneq 8(%rdi), %rcx
|
|
|
|
; CHECK-NEXT: movq %rcx, 8(%rsi)
|
|
|
|
; CHECK-NEXT: movq %rax, (%rsi)
|
|
|
|
; CHECK-NEXT: retq
|
|
|
|
%a = load fp128, fp128* %p, align 2
|
|
|
|
%r = select i1 %c, fp128 %a, fp128 0xL00000000000000007FFF800000000000
|
|
|
|
store fp128 %r, fp128* %q
|
|
|
|
ret void
|
|
|
|
}
|