Commit Graph

21673 Commits

Author SHA1 Message Date
Chris Lattner 6084664580 Modify this test to not depend on the host math.h implementation
llvm-svn: 25138
2006-01-07 01:37:25 +00:00
Chris Lattner 9cbfbc21bb fix some 176.gcc miscompilation from my previous patch.
llvm-svn: 25137
2006-01-07 01:32:28 +00:00
Evan Cheng 92e2797ce2 * Added integer div / rem.
* Fixed a load folding bug.

llvm-svn: 25136
2006-01-06 23:19:29 +00:00
Robert Bocchino cdd229a82e Fixed Makefile so it does, indeed, build a dynamic library.
llvm-svn: 25135
2006-01-06 22:51:19 +00:00
Robert Bocchino 19cbea15d4 Fixed a typo; "= 1" was missing.
llvm-svn: 25134
2006-01-06 22:49:23 +00:00
Evan Cheng 482ef91d26 Pattern complexity calculation fix.
llvm-svn: 25133
2006-01-06 22:19:44 +00:00
Evan Cheng 10d2790d50 ISEL code for MULHU, MULHS, and UNDEF.
llvm-svn: 25132
2006-01-06 20:36:21 +00:00
Andrew Lenharth 346b4120af make 0 codegen much better
llvm-svn: 25131
2006-01-06 19:41:51 +00:00
Chris Lattner 330628a6d8 silence some bogus gcc warnings on fenris
llvm-svn: 25130
2006-01-06 17:59:59 +00:00
Chris Lattner efbb8da3f5 silence a bogus gcc warning
llvm-svn: 25129
2006-01-06 17:56:38 +00:00
Chris Lattner eb372a0276 Enhance the shift-shift folding code to allow a no-op cast to occur in between
the shifts.

This allows us to fold this (which is the 'integer add a constant' sequence
from cozmic's scheme compmiler):

int %x(uint %anf-temporary776) {
        %anf-temporary777 = shr uint %anf-temporary776, ubyte 1
        %anf-temporary800 = cast uint %anf-temporary777 to int
        %anf-temporary804 = shl int %anf-temporary800, ubyte 1
        %anf-temporary805 = add int %anf-temporary804, -2
        %anf-temporary806 = or int %anf-temporary805, 1
        ret int %anf-temporary806
}

into this:

int %x(uint %anf-temporary776) {
        %anf-temporary776 = cast uint %anf-temporary776 to int
        %anf-temporary776.mask1 = add int %anf-temporary776, -2
        %anf-temporary805 = or int %anf-temporary776.mask1, 1
        ret int %anf-temporary805
}

note that instcombine already knew how to eliminate the AND that the two
shifts fold into.  This is tested by InstCombine/shift.ll:test26

-Chris

llvm-svn: 25128
2006-01-06 07:52:12 +00:00
Chris Lattner 60d3002606 A case that instcombine is not catching.
llvm-svn: 25127
2006-01-06 07:48:28 +00:00
Chris Lattner b330939d90 Simplify the code a bit more
llvm-svn: 25126
2006-01-06 07:22:22 +00:00
Chris Lattner 145539343f Extract a bunch of code out of visitShiftInst into FoldShiftByConstant. No
functionality changes.

llvm-svn: 25125
2006-01-06 07:12:35 +00:00
Chris Lattner fae8afb77f Unbreak the build :(
llvm-svn: 25124
2006-01-06 05:47:48 +00:00
Evan Cheng 53dd0ac226 Addd (shl x, 1) ==> (shl x, x) peepholes.
llvm-svn: 25123
2006-01-06 02:31:59 +00:00
Evan Cheng 46634d21e3 Tweak pattern complexity calc.
llvm-svn: 25122
2006-01-06 02:30:23 +00:00
Evan Cheng 85c973cda9 Revert the previous check-in. Leave shl x, 1 along for target to deal with.
llvm-svn: 25121
2006-01-06 01:56:02 +00:00
Evan Cheng b03f9b32d2 fold (shl x, 1) -> (add x, x)
llvm-svn: 25120
2006-01-06 01:06:31 +00:00
Chris Lattner b87030358d linkonce symbols have an extra indirection, just like weak ones do. This fixes
Prolangs-C++/family and Prolangs-C++/primes.

llvm-svn: 25119
2006-01-06 01:04:03 +00:00
Evan Cheng 172fce7050 * Fast call support.
* FP cmp, setcc, etc.

llvm-svn: 25117
2006-01-06 00:43:03 +00:00
Evan Cheng f35b1c837f Support for custom lowering of ISD::RET.
llvm-svn: 25116
2006-01-06 00:41:43 +00:00
Evan Cheng 6b037909ff Bug fix wrt chain operand.
llvm-svn: 25115
2006-01-06 00:41:12 +00:00
Chris Lattner 20c88dfd1b Fix a compile crash building MultiSource/Applications/d with the new front-end.
The PPC backend was generating random shift counts in this case, due to an
uninitialized variable.

llvm-svn: 25114
2006-01-05 18:32:49 +00:00
Robert Bocchino b5f210f3f2 Added the spec for the new "extractelement" instruction.
llvm-svn: 25113
2006-01-05 17:37:02 +00:00
Chris Lattner fed8ceb56a Implement a few symbolic constant folding things. X ? Y : Y is Y.
Fold:
seteq ({ short }* cast (int 1 to { short }*), { short }* null)
setlt ({ short }* cast (int 1 to { short }*), { short }* cast (int 2 to { short }*))

to false/true.  These last two commonly occur in the output of compilers that
tag integers, like cozmic's scheme compiler.

Tested by Regression/Assembler/ConstantExprFold.llx

llvm-svn: 25112
2006-01-05 07:49:30 +00:00
Chris Lattner b844284a05 new tests, derived from cosmics scheme output
llvm-svn: 25111
2006-01-05 07:46:46 +00:00
Chris Lattner 0f7e9f5180 fix some formatting problems
llvm-svn: 25110
2006-01-05 07:19:51 +00:00
Chris Lattner da56ae98a9 unbreak the build, these are now in TargetSelectionDAG.td
llvm-svn: 25109
2006-01-05 04:48:15 +00:00
Evan Cheng a5ae6e8320 Added ConstantFP patterns.
llvm-svn: 25108
2006-01-05 02:08:37 +00:00
Evan Cheng e0d1b65d24 Added fpimm node for ConstantFP.
llvm-svn: 25107
2006-01-05 02:07:49 +00:00
Jim Laskey a1026371b5 Grammer correction.
llvm-svn: 25106
2006-01-05 01:53:28 +00:00
Jim Laskey deeafa0f00 Had expand logic backward.
llvm-svn: 25105
2006-01-05 01:47:43 +00:00
Jim Laskey 762e9ec06c Added initial support for DEBUG_LABEL allowing debug specific labels to be
inserted in the code.

llvm-svn: 25104
2006-01-05 01:25:28 +00:00
Evan Cheng 45e19098a6 DAG based isel call support.
llvm-svn: 25103
2006-01-05 00:27:02 +00:00
Evan Cheng 779dd94721 Remove some dead code.
llvm-svn: 25102
2006-01-05 00:26:14 +00:00
Chris Lattner 95d46c17c0 remove unused header
llvm-svn: 25101
2006-01-05 00:21:37 +00:00
Jim Laskey 219d559824 Applied some recommend changes from sabre. The dominate one beginning "let the
pass manager do it's thing."  Fixes crash when compiling -g files and suppresses
dwarf statements if no debug info is present.

llvm-svn: 25100
2006-01-04 22:28:25 +00:00
Jeff Cohen 853116145d Be consistent in using class vs struct to make VC++ happy. And as it contains
methods, virtual method even, class wins.

llvm-svn: 25098
2006-01-04 17:21:23 +00:00
Jeff Cohen 37c56fc58f Teach Visual Studio about new file.
llvm-svn: 25097
2006-01-04 17:19:48 +00:00
Jim Laskey 0da76a676a Add unique id to debug location for debug label use (work in progress.)
llvm-svn: 25096
2006-01-04 15:04:11 +00:00
Jim Laskey 2741e8304c Add check for debug presence.
llvm-svn: 25095
2006-01-04 14:30:12 +00:00
Jim Laskey c972f0504a Add flag for debug presence.
llvm-svn: 25094
2006-01-04 14:29:26 +00:00
Jim Laskey b0609d91c3 Tie dwarf generation to darwin assembler.
llvm-svn: 25093
2006-01-04 13:52:30 +00:00
Jim Laskey 1e8731ef60 1. Make MachineDebugInfo a pass.
2. Add label uniquing code.

llvm-svn: 25092
2006-01-04 13:46:37 +00:00
Jim Laskey a48e8f5fd1 Move MachineDebugInfo to module level location.
llvm-svn: 25091
2006-01-04 13:44:43 +00:00
Jim Laskey 57a5e0b45a Moving MachineDebugInfo to module level location.
llvm-svn: 25090
2006-01-04 13:43:56 +00:00
Jim Laskey 6f9ff633a6 Change how MachineDebugInfo is fetched.
llvm-svn: 25089
2006-01-04 13:42:59 +00:00
Jim Laskey 9744c6292b Adding MachineDebugInfo as a immutable pass.
llvm-svn: 25088
2006-01-04 13:42:02 +00:00
Jim Laskey 2f28b667e0 Adding new files.
llvm-svn: 25087
2006-01-04 13:37:32 +00:00