LLVM backend for 6502
Go to file
Sanjay Patel 956d6f0cf5 Model sqrtsd as a binary operation with one source operand tied to the destination (PR14221)
This patch fixes the following miscompile:

define void @sqrtsd(<2 x double> %a) nounwind uwtable ssp {
  %0 = tail call <2 x double> @llvm.x86.sse2.sqrt.sd(<2 x double> %a) nounwind 
  %a0 = extractelement <2 x double> %0, i32 0
  %conv = fptrunc double %a0 to float
  %a1 = extractelement <2 x double> %0, i32 1
  %conv3 = fptrunc double %a1 to float
  tail call void @callee2(float %conv, float %conv3) nounwind
  ret void
}

Current codegen:

sqrtsd	%xmm0, %xmm1        ## high element of %xmm1 is undef here
xorps	%xmm0, %xmm0
cvtsd2ss	%xmm1, %xmm0
shufpd	$1, %xmm1, %xmm1
cvtsd2ss	%xmm1, %xmm1 ## operating on undef value
jmp	_callee

This is a continuation of http://llvm.org/viewvc/llvm-project?view=revision&revision=224624 ( http://reviews.llvm.org/D6330 ) 
which was itself a continuation of r167064 ( http://llvm.org/viewvc/llvm-project?view=revision&revision=167064 ).

All of these patches are partial fixes for PR14221 ( http://llvm.org/bugs/show_bug.cgi?id=14221 ); 
this should be the final patch needed to resolve that bug.

Differential Revision: http://reviews.llvm.org/D6885



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227111 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-26 18:42:16 +00:00
autoconf Teach the autoconf machinery about the PS4 triple. 2015-01-26 15:25:05 +00:00
bindings
cmake
docs [docs] Add link to the MIPS 64-bit ELF object file specification 2015-01-25 16:20:30 +00:00
examples
include Pass QueryInst down through non-local dependency calculation 2015-01-26 18:39:52 +00:00
lib Model sqrtsd as a binary operation with one source operand tied to the destination (PR14221) 2015-01-26 18:42:16 +00:00
projects
test Model sqrtsd as a binary operation with one source operand tied to the destination (PR14221) 2015-01-26 18:42:16 +00:00
tools [ELFYAML] Support mips64 relocation record format in yaml2obj/obj2yaml 2015-01-25 13:29:25 +00:00
unittests Teach raw_ostream to support hex formatting without a prefix '0x'. 2015-01-26 18:21:33 +00:00
utils [X86] Replace i32i8imm on SSE/AVX instructions with i32u8imm which will make the assembler bounds check them. It will also make them print as unsigned. 2015-01-25 02:21:16 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitignore
CMakeLists.txt Trunk is now 3.7.0svn 2015-01-14 17:38:03 +00:00
CODE_OWNERS.TXT
configure
CREDITS.TXT Rise from the dead and update personal info 2014-08-25 17:51:04 +00:00
LICENSE.TXT Remove projects/sample. 2014-03-12 22:40:22 +00:00
llvm.spec.in
LLVMBuild.txt Remove the very substantial, largely unmaintained legacy PGO 2013-10-02 15:42:23 +00:00
Makefile
Makefile.common
Makefile.config.in
Makefile.rules
README.txt Check commit access 2015-01-16 19:23:34 +00:00

Low Level Virtual Machine (LLVM)
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you're writing a package for LLVM, see docs/Packaging.rst for our
suggestions.