Scott Michel
3ad0263173
Make tblgen a little smarter about constants smaller than i32. Currently,
...
tblgen will complain if a sign-extended constant does not fit into a
data type smaller than i32, e.g., i16. This causes a problem when certain
hex constants are used, such as 0xff for byte masks or immediate xor
values.
tblgen will try the sign-extended value first and, if the sign extended
value would overflow, it tries to see if the unsigned value will fit.
Consequently, a software developer can now safely incant:
(XORHIr16 R16C:$rA, 0xffff)
which is somewhat clearer and more informative than incanting:
(XORHIr16 R16C:$rA, (i16 -1))
even if the two are bitwise equivalent.
Tblgen also outputs the 64-bit unsigned constant in the generated ISel code
when getTargetConstant() is invoked.
llvm-svn: 47188
2008-02-15 23:05:48 +00:00
Chris Lattner
2258e9fd08
simplify this.
...
llvm-svn: 47187
2008-02-15 22:57:17 +00:00
Dale Johannesen
15e608542e
Modify test to expect improved code.
...
llvm-svn: 47182
2008-02-15 22:05:15 +00:00
Evan Cheng
09fee0e727
The copy instruction being coalesced will be removed, it is not a kill.
...
llvm-svn: 47179
2008-02-15 21:36:51 +00:00
Ted Kremenek
83e9c3ba5c
Fixed bug in FoldingSetIteratorImpl where we did not correctly check if
...
we had reached the "fake bucket" after the last bucket, allowing the iterator
in some cases to run off the end of the hashtable.
llvm-svn: 47178
2008-02-15 21:12:46 +00:00
Dan Gohman
547cd33955
Skip over the defs and start at the uses when looking for operands
...
with the TIED_TO attribute.
llvm-svn: 47177
2008-02-15 20:59:17 +00:00
Dan Gohman
06ac7aca3e
Use the TargetInstrDescr to determine the number of operands
...
that should be checked for the TIED_TO attribute instead of
using CountOperands.
llvm-svn: 47176
2008-02-15 20:50:13 +00:00
Duncan Sands
e0330d632a
Fix this test on linux, which returns S242
...
using sret.
llvm-svn: 47173
2008-02-15 19:42:13 +00:00
Duncan Sands
bf7d428157
Teach LegalizeTypes how to promote the flags
...
in a ret node. These are created as i32 constants
but on some platforms i32 is not legal. This
fixes 26 "make check" failures, for example
Alpha/2005-07-12-TwoMallocCalls.ll.
llvm-svn: 47172
2008-02-15 19:34:17 +00:00
Chris Lattner
d55c26a77d
Handle \n's in value names for more targets. The asm printers
...
really really really need refactoring :(
llvm-svn: 47171
2008-02-15 19:04:54 +00:00
Chris Lattner
cf98f7291b
If the llvm name contains an unprintable character, don't print it in
...
the global comment. This prevents printing things like:
... # foo
bar
when the name is "foo\nbar".
llvm-svn: 47170
2008-02-15 18:56:05 +00:00
Chris Lattner
bab03a1b50
targets that support quotes for mangled names still need to escape newlines
...
when they occur in the name, just like " is escaped.
llvm-svn: 47169
2008-02-15 18:54:56 +00:00
Dale Johannesen
b9e1a37497
Cosmetics.
...
llvm-svn: 47168
2008-02-15 18:40:53 +00:00
Evan Cheng
bb357cd8a6
- Removing the infamous r2rMap_ and rep() method. Now the coalescer will update
...
register defs and uses after each successful coalescing.
- Also removed a number of hacks and fixed some subtle kill information bugs.
llvm-svn: 47167
2008-02-15 18:24:29 +00:00
Evan Cheng
2cb3fd8f72
Added CommuteChangesDestination(). This returns true if commuting the specified
...
machine instr will change its definition register.
llvm-svn: 47166
2008-02-15 18:21:33 +00:00
Evan Cheng
fff5254adf
Remove unnecessary #include.
...
llvm-svn: 47164
2008-02-15 18:12:09 +00:00
Dan Gohman
8ff2d5e0e3
Use StoreSDNode::getValue instead of calling getOperand directly
...
with a hard-coded operand number.
llvm-svn: 47163
2008-02-15 18:11:59 +00:00
Dale Johannesen
de53aaec39
Remove warning about 64-bit code on processor
...
that doesn't support it. Per Chris.
llvm-svn: 47162
2008-02-15 18:09:51 +00:00
Lauro Ramos Venancio
4fcf9513f1
It is not safe to call fork in PrintStackTrace. Sometimes it freezes the program.
...
llvm-svn: 47161
2008-02-15 18:05:54 +00:00
Dan Gohman
e34f24132b
Change MemOperand's size and offset to be 64-bit.
...
llvm-svn: 47151
2008-02-15 01:29:57 +00:00
Devang Patel
01f9252f73
Fix PR2028
...
llvm-svn: 47150
2008-02-15 01:24:49 +00:00
Dale Johannesen
da9de4b3f0
nocona, core2 and penryn support 64 bit.
...
llvm-svn: 47149
2008-02-15 01:22:41 +00:00
Chris Lattner
3bac9de032
Support vector constant zeros, thanks to Zack Rusin for the testcase.
...
llvm-svn: 47148
2008-02-15 00:57:28 +00:00
Dale Johannesen
6cb8a628a2
Rewrite tblgen handling of subtarget features so
...
it follows the order of the enum, not alphabetical.
The motivation is to make -mattr=+ssse3,+sse41
select SSE41 as it ought to. Added "ignored"
enum values of 0 to PPC and SPU to avoid compiler
warnings.
llvm-svn: 47143
2008-02-14 23:35:16 +00:00
Devang Patel
8af92b942c
If loop header is also loop exiting block then OrigPN is incoming value for B loop header.
...
Fixes PR 2030.
llvm-svn: 47141
2008-02-14 23:18:47 +00:00
Dan Gohman
9ca30afc39
Fix a warning about comparison between signed and unsigned,
...
being consistent with the rest of the APInt implementation.
llvm-svn: 47138
2008-02-14 22:38:45 +00:00
Chris Lattner
b8bf200b77
Fix PR2029
...
llvm-svn: 47129
2008-02-14 19:18:13 +00:00
Chris Lattner
9c24f3ec37
Fix a miscompilation from Dan's recent apintification.
...
llvm-svn: 47128
2008-02-14 18:48:56 +00:00
Nate Begeman
9deedb0114
Fix single precision FP constants on SPU. They are actually legal,
...
which allows us to kill a target-specific node.
llvm-svn: 47127
2008-02-14 18:43:04 +00:00
Duncan Sands
27f4dab7a3
Rename CFEBuildInstrs.html to GCCFEBuildInstrs.html.
...
Update all references to it and place a redirection
page at the old address.
llvm-svn: 47124
2008-02-14 17:53:22 +00:00
Duncan Sands
0056f1e823
In TargetLowering::LowerCallTo, don't assert that
...
the return value is zero-extended if it isn't
sign-extended. It may also be any-extended.
Also, if a floating point value was returned
in a larger floating point type, pass 1 as the
second operand to FP_ROUND, which tells it
that all the precision is in the original type.
I think this is right but I could be wrong.
Finally, when doing libcalls, set isZExt on
a parameter if it is "unsigned". Currently
isSExt is set when signed, and nothing is
set otherwise. This should be right for all
calls to standard library routines.
llvm-svn: 47122
2008-02-14 17:28:50 +00:00
Nate Begeman
1ef1013b6c
Change how FP immediates are handled.
...
1) ConstantFP is now expand by default
2) ConstantFP is not turned into TargetConstantFP during Legalize
if it is legal.
This allows ConstantFP to be handled like Constant, allowing for
targets that can encode FP immediates as MachineOperands.
As a bonus, fix up Itanium FP constants, which now correctly match,
and match more constants! Hooray.
llvm-svn: 47121
2008-02-14 08:57:00 +00:00
Tanya Lattner
df7da98f55
Remove llvm-upgrade
...
llvm-svn: 47119
2008-02-14 07:57:12 +00:00
Nate Begeman
8352abdd98
Support a new type of MachineOperand, MO_FPImmediate, used for holding
...
FP Immediates, crazily enough
llvm-svn: 47117
2008-02-14 07:39:30 +00:00
Chris Lattner
5005b4d0d8
simplify code, no functionality change.
...
llvm-svn: 47116
2008-02-14 07:39:01 +00:00
Nate Begeman
5d61361bb9
Move some useful operands up into the all-targets .td
...
llvm-svn: 47115
2008-02-14 07:25:46 +00:00
Nate Begeman
929fd03fbe
Nuke dead comment
...
llvm-svn: 47114
2008-02-14 07:23:11 +00:00
Nick Lewycky
12098ea401
Testcase for PR2032.
...
llvm-svn: 47113
2008-02-14 07:15:11 +00:00
Nick Lewycky
0dd6ce5d3a
Fix PR2032. Inform the alias analysis of changes to the underlying program.
...
llvm-svn: 47111
2008-02-14 07:11:24 +00:00
Tanya Lattner
f37f44f9ec
Remove llvm-upgrade.
...
llvm-svn: 47110
2008-02-14 06:56:27 +00:00
Chris Lattner
b714906acf
upgrade some entries, remove stuff that is done.
...
llvm-svn: 47109
2008-02-14 06:19:02 +00:00
Chris Lattner
037aa64987
the mid-level optimizer removes this stuff.
...
llvm-svn: 47108
2008-02-14 05:43:18 +00:00
Chris Lattner
10dc770a36
this one is easy.
...
llvm-svn: 47107
2008-02-14 05:41:38 +00:00
Chris Lattner
d696c25db5
This readme entry is done, testcase here: CodeGen/X86/zero-remat.ll
...
llvm-svn: 47106
2008-02-14 05:39:46 +00:00
Nick Lewycky
e6e0cdd2dc
PR2027, Fix bugpoint's -find-bugs option, clean up the code.
...
llvm-svn: 47105
2008-02-14 05:01:46 +00:00
Evan Cheng
cbbcb3144d
Fix test.
...
llvm-svn: 47102
2008-02-14 01:32:53 +00:00
Dan Gohman
83374c9be5
Allow the APInt form of ComputeMaskedBits to operate on i128 types.
...
llvm-svn: 47101
2008-02-13 23:13:32 +00:00
Dan Gohman
737856bd0d
Assigning an APInt to 0 with plain assignment gives it a one-bit
...
size. Initialize these APInts to properly-sized zero values.
llvm-svn: 47099
2008-02-13 23:07:24 +00:00
Dan Gohman
a5ad7ff23b
Avoid setting bits that aren't demanded.
...
llvm-svn: 47098
2008-02-13 22:43:25 +00:00
Dan Gohman
5562e340b7
Fix a typo in a comment.
...
llvm-svn: 47097
2008-02-13 22:32:12 +00:00