Rafael Espindola
b5f1ff336a
add fp sub
...
llvm-svn: 30859
2006-10-10 19:35:01 +00:00
Rafael Espindola
57d109fb08
add double <-> int conversion
...
llvm-svn: 30858
2006-10-10 18:55:14 +00:00
Chris Lattner
8438429c96
Fix another bug in extload promotion.
...
llvm-svn: 30857
2006-10-10 18:54:19 +00:00
Rafael Espindola
d1a4ea41c9
compare doubles
...
llvm-svn: 30856
2006-10-10 16:33:47 +00:00
Rafael Espindola
639450ea83
add some tests for floating point compare
...
llvm-svn: 30855
2006-10-10 14:26:06 +00:00
Rafael Espindola
d15c892433
initial support for fp compares. Unordered compares not implemented yet
...
llvm-svn: 30854
2006-10-10 12:56:00 +00:00
Evan Cheng
dc6a3aab71
Fix a bug introduced by my LOAD/LOADX changes.
...
llvm-svn: 30853
2006-10-10 07:51:21 +00:00
Evan Cheng
6d37137e4f
Add test case from PR940.
...
llvm-svn: 30852
2006-10-10 04:33:46 +00:00
Evan Cheng
61b8b43bbe
More isel time load folding checking for nodes that produce flag values.
...
See comment in CanBeFoldedBy() for detailed explanation.
llvm-svn: 30851
2006-10-10 01:46:56 +00:00
Evan Cheng
e01ee43cdc
Comments; getChain(), getBasePtr(), etc. should return a SDOperand by value.
...
llvm-svn: 30850
2006-10-10 01:44:58 +00:00
Evan Cheng
16488647d8
shufps with load folding is better than movaps; movsd.
...
llvm-svn: 30849
2006-10-09 22:42:31 +00:00
Evan Cheng
57ccb6d372
Don't go too crazy with these AddComplexity. Try matching shufps with load
...
folding first.
llvm-svn: 30848
2006-10-09 21:42:15 +00:00
Evan Cheng
e646abb7b6
Don't convert to MOVLP if using shufps etc. may allow load folding.
...
llvm-svn: 30847
2006-10-09 21:39:25 +00:00
Devang Patel
d90c2d7386
Use FindProgramByName instead of FindExecutable.
...
llvm-svn: 30846
2006-10-09 21:16:05 +00:00
Evan Cheng
75a1b70da8
Predicate function on the node should be matched before its childrean' matching
...
code. This is especially important now matching ISD::LOAD also requires a
Predicate_Load call.
llvm-svn: 30845
2006-10-09 21:02:17 +00:00
Evan Cheng
e71fe34d75
Reflects ISD::LOAD / ISD::LOADX / LoadSDNode changes.
...
llvm-svn: 30844
2006-10-09 20:57:25 +00:00
Evan Cheng
0a2a4b1fbe
Merging ISD::LOAD and ISD::LOADX. Added LoadSDNode to represent load nodes.
...
Chain and address ptr remains as operands. SrcValue, extending mode, extending
VT (or rather loaded VT before extension) are now instance variables of
LoadSDNode.
Introduce load / store addressing modes to represent pre- and post-indexed
load and store. Also added an additional operand offset that is only used in
post-indexed mode (i.e. base ptr += offset after load/store).
Added alignment info (not yet used) and isVolatile fields.
llvm-svn: 30843
2006-10-09 20:55:20 +00:00
Devang Patel
060c4857ca
Do error checking.
...
llvm-svn: 30842
2006-10-09 20:20:13 +00:00
Chris Lattner
dfa8d9258a
Remove a dead var noticed by Yorion
...
llvm-svn: 30841
2006-10-09 20:12:37 +00:00
Rafael Espindola
4d03bf8f43
add some tests for floating point arithmetic
...
llvm-svn: 30840
2006-10-09 19:15:17 +00:00
Andrew Lenharth
68ca2c483f
Fix build error in gcc 3.4 and make more this general
...
llvm-svn: 30839
2006-10-09 19:05:44 +00:00
Devang Patel
dacaf1e375
Use GetTemporaryDirectory. Fix http://llvm.org/bugs/show_bug.cgi?id=894
...
llvm-svn: 30838
2006-10-09 19:04:51 +00:00
Nick Lewycky
afb040a603
Fix usage example.
...
llvm-svn: 30837
2006-10-09 18:33:08 +00:00
Rafael Espindola
9e29ec371a
add float -> double and double -> float conversion
...
llvm-svn: 30835
2006-10-09 17:50:29 +00:00
Reid Spencer
ff35900383
Fix PR886:
...
The result of yyparse() was not being checked. When YYERROR or YYABORT is
called it causes yyparse() to return 1 to indicate the error. The code was
silently ignoring this situation because it previously expected either an
exception or a null ParserResult to indicate an error. The patch corrects
this situation.
llvm-svn: 30834
2006-10-09 17:36:59 +00:00
Chris Lattner
fb257818c4
xfail this until andrew has a chance to implement the alpha TM method.
...
llvm-svn: 30833
2006-10-09 17:34:40 +00:00
Rafael Espindola
0e44ed293f
add a test for adds adcs
...
llvm-svn: 30832
2006-10-09 17:30:15 +00:00
Chris Lattner
aba5e1ee97
Fix a bug pointed out by Zhongxing Xu
...
llvm-svn: 30831
2006-10-09 17:28:13 +00:00
Rafael Espindola
396b4a6b7b
add ADDS and ADCS
...
llvm-svn: 30830
2006-10-09 17:18:28 +00:00
Rafael Espindola
e4c3276afc
expand ISD::SELECT
...
llvm-svn: 30829
2006-10-09 16:28:33 +00:00
Rafael Espindola
c154dacb2f
add a note
...
llvm-svn: 30828
2006-10-09 14:18:33 +00:00
Rafael Espindola
41730922bb
expand ISD::EXTLOAD
...
llvm-svn: 30827
2006-10-09 14:13:40 +00:00
Rafael Espindola
78d6c2bf59
most ARM targets are little endian
...
llvm-svn: 30826
2006-10-09 14:12:15 +00:00
Chris Lattner
41b442242d
Implement SROA of unions with mixed pointers/integers in them. This implements
...
PR892 and Transforms/ScalarRepl/union-pointer.ll:test2
llvm-svn: 30825
2006-10-08 23:53:04 +00:00
Chris Lattner
7440e23eb2
new testcase for PR892
...
llvm-svn: 30824
2006-10-08 23:52:06 +00:00
Chris Lattner
05f8272afa
Implement Transforms/ScalarRepl/union-pointer.ll:test
...
llvm-svn: 30823
2006-10-08 23:28:04 +00:00
Chris Lattner
7a36ae4361
new testcase for SROA for stuff like "union { int*, float* }".
...
llvm-svn: 30822
2006-10-08 23:27:37 +00:00
Chris Lattner
5ab6d8b3fc
Eliminate more token factors by taking advantage of transitivity:
...
if TF depends on A and B, and A depends on B, TF just needs to depend on
A. With Jim's alias-analysis stuff enabled, this compiles the testcase in
PR892 into:
__Z4test3Val:
subl $44, %esp
call L__Z3foov$stub
movl %edx, 28(%esp)
movl %eax, 32(%esp)
movl %eax, 24(%esp)
movl %edx, 36(%esp)
movl 52(%esp), %ecx
movl %ecx, 4(%esp)
movl %eax, 8(%esp)
movl %edx, 12(%esp)
movl 48(%esp), %eax
movl %eax, (%esp)
call L__Z3bar3ValS_$stub
addl $44, %esp
ret
instead of:
__Z4test3Val:
subl $44, %esp
call L__Z3foov$stub
movl %eax, 24(%esp)
movl %edx, 28(%esp)
movl 24(%esp), %eax
movl %eax, 32(%esp)
movl 28(%esp), %eax
movl %eax, 36(%esp)
movl 32(%esp), %eax
movl 36(%esp), %ecx
movl 52(%esp), %edx
movl %edx, 4(%esp)
movl %eax, 8(%esp)
movl %ecx, 12(%esp)
movl 48(%esp), %eax
movl %eax, (%esp)
call L__Z3bar3ValS_$stub
addl $44, %esp
ret
llvm-svn: 30821
2006-10-08 22:57:01 +00:00
Chris Lattner
9e512e5bd0
Fix PR897
...
llvm-svn: 30820
2006-10-08 22:28:34 +00:00
Jim Laskey
0463e08005
Combiner alias analysis passes Multisource (release-asserts.)
...
llvm-svn: 30818
2006-10-07 23:37:56 +00:00
Chris Lattner
398195ebbe
completely disable folding of loads into scalar sse instructions and provide
...
a framework for doing it right. This fixes
CodeGen/X86/2006-10-07-ScalarSSEMiscompile.ll.
Once X86DAGToDAGISel::SelectScalarSSELoad is implemented right, this task
will be done.
llvm-svn: 30817
2006-10-07 21:55:32 +00:00
Chris Lattner
f8fa10a6bb
new testcase we miscompile
...
llvm-svn: 30816
2006-10-07 21:54:08 +00:00
Chris Lattner
942009fee5
convert packed FP add/sub/mul/div to use a multiclass.
...
llvm-svn: 30815
2006-10-07 21:17:13 +00:00
Chris Lattner
4005f4e49c
one multiclass now defines all 8 variants of binary-scalar-sse-fp operations.
...
llvm-svn: 30814
2006-10-07 20:55:57 +00:00
Chris Lattner
6eaee2c8e3
Switch ADD/MUL/DIV/SUB scalarsse fp ops to a multiclass
...
llvm-svn: 30813
2006-10-07 20:35:44 +00:00
Chris Lattner
c8c6441821
Random acts of shrinkage
...
llvm-svn: 30812
2006-10-07 19:49:05 +00:00
Chris Lattner
b5df7e554d
Convert pand/por/pxor to use multiclass
...
llvm-svn: 30811
2006-10-07 19:37:30 +00:00
Chris Lattner
6138cba5f1
Convert some more instructions over to use a new multiclass.
...
Fix a bug where the asmstring for PSUBQrm was wrong.
llvm-svn: 30810
2006-10-07 19:34:33 +00:00
Chris Lattner
662ba43f08
Fix a bug where PADDQrm printed paddd instead of paddq.
...
llvm-svn: 30809
2006-10-07 19:15:46 +00:00
Chris Lattner
29c62a3c88
Add multiclass for SSE2 instructions that correspond to simple binops.
...
llvm-svn: 30808
2006-10-07 19:14:49 +00:00
Chris Lattner
e0928d9d7b
rename:
...
PDI_binop_rm -> PDI_binop_rm_int
PDI_binop_rmi -> PDI_binop_rmi_int
to make it clear that these are for use with intrinsics.
llvm-svn: 30807
2006-10-07 19:02:31 +00:00
Chris Lattner
489b63089d
Convert saturating PADD/PSUB's to use a multiclass
...
llvm-svn: 30806
2006-10-07 18:48:46 +00:00
Chris Lattner
fa2ce8824d
Convert PAVG*, PMADDWD, and PMUL* to use multiclasses.
...
llvm-svn: 30805
2006-10-07 18:39:00 +00:00
Chris Lattner
cab92e4c0c
Fix typo in packsswb instr definition, where the load had the wrong type.
...
This allows us to use the multiclass for other packs.
llvm-svn: 30804
2006-10-07 18:23:58 +00:00
Rafael Espindola
b50938866b
implement FUITOS and FUITOD
...
llvm-svn: 30803
2006-10-07 14:24:52 +00:00
Rafael Espindola
58c368bc4f
implement FLDD
...
llvm-svn: 30802
2006-10-07 14:03:39 +00:00
Rafael Espindola
40f5dd27f0
implement fadds, faddd, fmuls and fmuld
...
llvm-svn: 30801
2006-10-07 13:46:42 +00:00
Chris Lattner
e746a9cd6a
handle pmin/pmax with multiclasses
...
llvm-svn: 30800
2006-10-07 07:49:33 +00:00
Chris Lattner
560804cc50
regenerate
...
llvm-svn: 30799
2006-10-07 07:15:19 +00:00
Chris Lattner
dfbda3598d
Bugfix: this allows multiclasses to have default arguments.
...
llvm-svn: 30798
2006-10-07 07:14:48 +00:00
Chris Lattner
b14e6a0f8c
simplify pack and shift intrinsics with multiclasses
...
llvm-svn: 30797
2006-10-07 07:06:17 +00:00
Chris Lattner
521fc4e33f
Use a multiclass to simplify 'SSE2 Integer comparison'
...
llvm-svn: 30796
2006-10-07 06:47:08 +00:00
Chris Lattner
c6138cec61
move class defns close to uses to make it easier to read
...
llvm-svn: 30795
2006-10-07 06:33:36 +00:00
Chris Lattner
87e692323c
simplify horizontal op definitions
...
llvm-svn: 30794
2006-10-07 06:31:41 +00:00
Chris Lattner
3e9fc37458
remove more unneeded type info
...
llvm-svn: 30793
2006-10-07 06:27:03 +00:00
Chris Lattner
807be0a715
remove unneeded definitions and type info
...
llvm-svn: 30792
2006-10-07 06:19:41 +00:00
Chris Lattner
5b1358a8eb
remove some unneeded type info
...
llvm-svn: 30791
2006-10-07 06:17:43 +00:00
Chris Lattner
3414c022af
simplify patterns by merging in operand info
...
llvm-svn: 30790
2006-10-07 05:50:25 +00:00
Chris Lattner
ca21ce5f08
Factor operands into packed unary classes
...
llvm-svn: 30789
2006-10-07 05:47:20 +00:00
Chris Lattner
0052c3ff5b
remove dead/duplicate instructions
...
llvm-svn: 30788
2006-10-07 05:41:52 +00:00
Chris Lattner
904c6e9c92
Pull operand info up into parent class for scalar sse intrinsics.
...
llvm-svn: 30787
2006-10-07 05:26:13 +00:00
Chris Lattner
e698c90ee9
convert the sole sd unary intrinsic to a multiclass for consistency
...
llvm-svn: 30786
2006-10-07 05:19:31 +00:00
Chris Lattner
2bb2f050f5
pull operand string into the multiclass
...
llvm-svn: 30785
2006-10-07 05:13:26 +00:00
Chris Lattner
069679c7b6
Remove RSQRTSS[rm] RCPSS[rm], which are dead.
...
Introduce SS_IntUnary, a multiclass to replace SS_Int[rm].
llvm-svn: 30784
2006-10-07 05:09:48 +00:00
Chris Lattner
f13a7b376c
eliminate redundancy
...
llvm-svn: 30783
2006-10-07 04:52:09 +00:00
Chris Lattner
f9f90bc239
Fix a bug legalizing zero-extending i64 loads into 32-bit loads. The bottom
...
part was always forced to be sextload, even when we needed an zextload.
llvm-svn: 30782
2006-10-07 00:58:36 +00:00
Chris Lattner
dc3064e223
Set the jt section
...
llvm-svn: 30781
2006-10-06 22:52:33 +00:00
Chris Lattner
a389a612bb
initialize ivar
...
llvm-svn: 30780
2006-10-06 22:52:08 +00:00
Chris Lattner
9043823cf4
If a target uses a GOT, put it in the jt data section, not the text
...
section. This will fix alpha when Andrew implements
AlphaTargetMachine::getTargetLowering().
llvm-svn: 30779
2006-10-06 22:50:56 +00:00
Chris Lattner
21fa769867
Alpha uses a got
...
llvm-svn: 30778
2006-10-06 22:46:51 +00:00
Chris Lattner
1c52b57ea8
Add support for targets to declare that they use a GOT
...
llvm-svn: 30777
2006-10-06 22:46:34 +00:00
Chris Lattner
9d75324ddf
jump tables handle pic
...
llvm-svn: 30776
2006-10-06 22:32:29 +00:00
Chris Lattner
4e107aa0b6
print labels even if a MBB doesn't have a corresponding LLVM BB, just don't
...
print the LLVM BB label.
llvm-svn: 30775
2006-10-06 21:28:17 +00:00
Rafael Espindola
aa2a12f1a2
add optional input flag to FMRRD
...
llvm-svn: 30774
2006-10-06 20:33:26 +00:00
Rafael Espindola
671f25281d
add support for calling functions that return double
...
llvm-svn: 30771
2006-10-06 19:10:05 +00:00
Evan Cheng
5fe9680253
80 col violation.
...
llvm-svn: 30770
2006-10-06 18:57:51 +00:00
Chris Lattner
2421a179e4
ugly codegen
...
llvm-svn: 30769
2006-10-06 17:39:34 +00:00
Chris Lattner
f5839a0816
Fix a miscompilation of:
...
long long foo(long long X) {
return (long long)(signed char)(int)X;
}
Instead of:
_foo:
extsb r2, r4
srawi r3, r4, 31
mr r4, r2
blr
we now produce:
_foo:
extsb r4, r4
srawi r3, r4, 31
blr
This fixes a miscompilation in ConstantFolding.cpp.
llvm-svn: 30768
2006-10-06 17:34:12 +00:00
Rafael Espindola
ef01656ea4
fix some bugs affecting functions with no arguments
...
llvm-svn: 30767
2006-10-06 17:26:30 +00:00
Rafael Espindola
6024ea8383
fix the stack alignment
...
llvm-svn: 30766
2006-10-06 14:29:47 +00:00
Rafael Espindola
5fe7909e18
add support for calling functions that have double arguments
...
llvm-svn: 30765
2006-10-06 12:50:22 +00:00
Evan Cheng
ff1beda569
Still need to support -mcpu=<> or cross compilation will fail. Doh.
...
llvm-svn: 30764
2006-10-06 09:17:41 +00:00
Evan Cheng
9274f72e58
Do away with CPU feature list. Just use CPUID to detect MMX, SSE, SSE2, SSE3, and 64-bit support.
...
llvm-svn: 30763
2006-10-06 08:21:07 +00:00
Evan Cheng
4c1a804a5b
It appears the inline asm in GetCpuIDAndInfo() may clobbers some registers if it isn't inlined (at < -O3). Force it to be inlined.
...
llvm-svn: 30762
2006-10-06 07:50:56 +00:00
Chris Lattner
469ea0c94d
add an accessor
...
llvm-svn: 30761
2006-10-06 01:16:29 +00:00
Chris Lattner
16ae43e901
MachineBasicBlock::splice was incorrectly updating parent pointers on
...
instructions.
llvm-svn: 30760
2006-10-06 01:12:44 +00:00
Evan Cheng
df9ac47e5e
Make use of getStore().
...
llvm-svn: 30759
2006-10-05 23:01:46 +00:00
Evan Cheng
af309d29b1
Add getStore() helper function to create ISD::STORE nodes.
...
llvm-svn: 30758
2006-10-05 22:57:11 +00:00
Chris Lattner
8b1a59a272
Don't crash if an MBB doesn't have an LLVM BB
...
llvm-svn: 30757
2006-10-05 21:40:14 +00:00
Rafael Espindola
decfeca52d
use a const ref for passing the vector to ArgumentLayout
...
llvm-svn: 30756
2006-10-05 17:46:48 +00:00