mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-03 14:08:57 +00:00
Fix PR10422 by adding the necessary AVX UCOMISD memory versions to
load folding logic git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135801 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
44a456332f
commit
dad38638e1
@ -407,6 +407,8 @@ X86InstrInfo::X86InstrInfo(X86TargetMachine &tm)
|
||||
{ X86::Int_CVTTSS2SIrr, X86::Int_CVTTSS2SIrm, 0 },
|
||||
{ X86::Int_UCOMISDrr, X86::Int_UCOMISDrm, 0 },
|
||||
{ X86::Int_UCOMISSrr, X86::Int_UCOMISSrm, 0 },
|
||||
{ X86::Int_VUCOMISDrr, X86::Int_VUCOMISDrm, 0 },
|
||||
{ X86::Int_VUCOMISSrr, X86::Int_VUCOMISSrm, 0 },
|
||||
{ X86::MOV16rr, X86::MOV16rm, 0 },
|
||||
{ X86::MOV32rr, X86::MOV32rm, 0 },
|
||||
{ X86::MOV64rr, X86::MOV64rm, 0 },
|
||||
@ -467,7 +469,9 @@ X86InstrInfo::X86InstrInfo(X86TargetMachine &tm)
|
||||
{ X86::TEST8rr, X86::TEST8rm, 0 },
|
||||
// FIXME: TEST*rr EAX,EAX ---> CMP [mem], 0
|
||||
{ X86::UCOMISDrr, X86::UCOMISDrm, 0 },
|
||||
{ X86::UCOMISSrr, X86::UCOMISSrm, 0 }
|
||||
{ X86::UCOMISSrr, X86::UCOMISSrm, 0 },
|
||||
{ X86::VUCOMISDrr, X86::VUCOMISDrm, 0 },
|
||||
{ X86::VUCOMISSrr, X86::VUCOMISSrm, 0 }
|
||||
};
|
||||
|
||||
for (unsigned i = 0, e = array_lengthof(OpTbl1); i != e; ++i) {
|
||||
@ -2491,7 +2495,9 @@ MachineInstr* X86InstrInfo::foldMemoryOperandImpl(MachineFunction &MF,
|
||||
case X86::AVX_SET0PSY:
|
||||
case X86::AVX_SET0PDY:
|
||||
case X86::FsFLD0SD:
|
||||
case X86::FsFLD0SS: {
|
||||
case X86::FsFLD0SS:
|
||||
case X86::VFsFLD0SD:
|
||||
case X86::VFsFLD0SS: {
|
||||
// Folding a V_SET0P? or V_SETALLONES as a load, to ease register pressure.
|
||||
// Create a constant-pool entry and operands to load from it.
|
||||
|
||||
|
28
test/CodeGen/X86/avx-cmp-fp.ll
Normal file
28
test/CodeGen/X86/avx-cmp-fp.ll
Normal file
@ -0,0 +1,28 @@
|
||||
; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7-avx -mattr=+avx | FileCheck %s
|
||||
|
||||
declare void @scale() nounwind uwtable
|
||||
|
||||
; CHECK: vucomisd .LCPI
|
||||
define void @render() nounwind uwtable {
|
||||
entry:
|
||||
br i1 undef, label %for.cond5, label %for.end52
|
||||
|
||||
for.cond5:
|
||||
%or.cond = and i1 undef, false
|
||||
br i1 %or.cond, label %for.body33, label %for.cond5
|
||||
|
||||
for.cond30:
|
||||
br i1 false, label %for.body33, label %for.cond5
|
||||
|
||||
for.body33:
|
||||
%tobool = fcmp une double undef, 0.000000e+00
|
||||
br i1 %tobool, label %if.then, label %for.cond30
|
||||
|
||||
if.then:
|
||||
call void @scale()
|
||||
br label %for.cond30
|
||||
|
||||
for.end52:
|
||||
ret void
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user