Skip to content
  • Chris Lattner's avatar
    Make X86TargetLowering::LowerSINT_TO_FP return without creating a dead · 83263b8c
    Chris Lattner authored
    stack slot and store if the  SINT_TO_FP is actually legal.  This allows
    us to compile:
    
    double a(double b) {return (unsigned)b;}
    
    to:
    
    _a:
    	cvttsd2siq	%xmm0, %rax
    	movl	%eax, %eax
    	cvtsi2sdq	%rax, %xmm0
    	ret
    
    instead of:
    
    _a:
    	subq	$8, %rsp
    	cvttsd2siq	%xmm0, %rax
    	movl	%eax, %eax
    	cvtsi2sdq	%rax, %xmm0
    	addq	$8, %rsp
    	ret
    
    crazy.
    
    llvm-svn: 47660
    83263b8c
Loading