llvm-6502/test
Chris Lattner 476769498e implement an optimization to codegen c ? 1.0 : 2.0 as load { 2.0, 1.0 } + c*4.
For 2009-03-07-FPConstSelect.ll we now produce:

_f:
	xorl	%eax, %eax
	testl	%edi, %edi
	movl	$4, %ecx
	cmovne	%rax, %rcx
	leaq	LCPI1_0(%rip), %rax
	movss	(%rcx,%rax), %xmm0
	ret

previously we produced:

_f:
	subl	$4, %esp
	cmpl	$0, 8(%esp)
	movss	LCPI1_0, %xmm0
	je	LBB1_2	## entry
LBB1_1:	## entry
	movss	LCPI1_1, %xmm0
LBB1_2:	## entry
	movss	%xmm0, (%esp)
	flds	(%esp)
	addl	$4, %esp
	ret

on PPC the code also improves to:

_f:
	cntlzw r2, r3
	srwi r2, r2, 5
	li r3, lo16(LCPI1_0)
	slwi r2, r2, 2
	addis r3, r3, ha16(LCPI1_0)
	lfsx f1, r3, r2
	blr 

from:

_f:
	li r2, lo16(LCPI1_1)
	cmplwi cr0, r3, 0
	addis r2, r2, ha16(LCPI1_1)
	beq cr0, LBB1_2	; entry
LBB1_1:	; entry
	li r2, lo16(LCPI1_0)
	addis r2, r2, ha16(LCPI1_0)
LBB1_2:	; entry
	lfs f1, 0(r2)
	blr 

This also improves the existing pic-cpool case from:

foo:
	subl	$12, %esp
	call	.Lllvm$1.$piclabel
.Lllvm$1.$piclabel:
	popl	%eax
	addl	$_GLOBAL_OFFSET_TABLE_ + [.-.Lllvm$1.$piclabel], %eax
	cmpl	$0, 16(%esp)
	movsd	.LCPI1_0@GOTOFF(%eax), %xmm0
	je	.LBB1_2	# entry
.LBB1_1:	# entry
	movsd	.LCPI1_1@GOTOFF(%eax), %xmm0
.LBB1_2:	# entry
	movsd	%xmm0, (%esp)
	fldl	(%esp)
	addl	$12, %esp
	ret

to:

foo:
	call	.Lllvm$1.$piclabel
.Lllvm$1.$piclabel:
	popl	%eax
	addl	$_GLOBAL_OFFSET_TABLE_ + [.-.Lllvm$1.$piclabel], %eax
	xorl	%ecx, %ecx
	cmpl	$0, 4(%esp)
	movl	$8, %edx
	cmovne	%ecx, %edx
	fldl	.LCPI1_0@GOTOFF(%eax,%edx)
	ret

This triggers a few dozen times in spec FP 2000.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66358 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-08 01:51:30 +00:00
..
Analysis Update this test for the LoopInfo::print changes. 2009-02-27 00:17:49 +00:00
Archive sabre brings to my attention that the 'tr' suffix is also obsolete 2008-05-20 21:00:03 +00:00
Assembler Fix a pretty awesome bug that only happened in a strange case with anonymous 2009-03-01 00:53:13 +00:00
Bindings/Ocaml tweak this to accept asmprinter changes. I have no way to verify this, hopefully 2009-03-01 01:28:40 +00:00
Bitcode fix a bitcode reader bug where it can't handle extractelement correctly: 2009-02-03 02:11:28 +00:00
BugPoint Remove accidental check-ins in r65960. :-( 2009-03-03 19:25:16 +00:00
CodeGen implement an optimization to codegen c ? 1.0 : 2.0 as load { 2.0, 1.0 } + c*4. 2009-03-08 01:51:30 +00:00
DebugInfo Ignore the debug info intrinsics when looking for dependency through basic block. 2009-03-05 01:45:43 +00:00
ExecutionEngine This is case is to uncover the bug in IntrinsicLowering.cpp, 2009-01-30 08:59:51 +00:00
Feature Reimplement the old and horrible bison parser for .ll files with a nice 2009-01-02 07:01:27 +00:00
FrontendAda Check that records with a known constant size are not 2009-02-25 18:10:49 +00:00
FrontendC Functions marked malloc are noalias return. 2009-03-01 16:19:31 +00:00
FrontendC++ - Use the "Fast" flag instead of "OptimizeForSize" to determine whether to emit 2009-02-24 02:35:30 +00:00
FrontendFortran Testcase for PR2437. 2009-02-09 09:41:49 +00:00
FrontendObjC And now, not so elegant, test case... 2009-02-17 22:48:18 +00:00
FrontendObjC++ This is an objective-c test, not an objective-c++ one. 2008-10-06 18:42:48 +00:00
Integer alignment of 0 is not valid. 2009-01-05 08:14:35 +00:00
lib Trailing whitespace. 2009-03-06 12:21:40 +00:00
Linker Reimplement the old and horrible bison parser for .ll files with a nice 2009-01-02 07:01:27 +00:00
LLVMC Add a comment. 2009-03-06 17:59:58 +00:00
Other Update another test for the LoopInfo::print changes. 2009-02-27 00:20:19 +00:00
Scripts simplify shell syntax to work better on solaris, patch by 2008-06-25 16:03:42 +00:00
TableGen Fun x86 encoding tricks: when adding an immediate value of 128, 2008-10-17 01:33:43 +00:00
Transforms fix a serious pessimization that Tron on IRC pointed out where we would 2009-03-07 23:32:02 +00:00
Verifier Reimplement the old and horrible bison parser for .ll files with a nice 2009-01-02 07:01:27 +00:00
Makefile Trailing whitespace. 2009-03-06 12:25:56 +00:00
Makefile.tests
TestRunner.sh Fix a bashism in TestRunner.sh. 2008-07-28 18:41:03 +00:00