Chris Lattner
34d6b6a319
Update this test. Due to dag combiner improvements, we now compile
...
f7/f11 to:
_f7:
eor r0, r0, #2 , 2 @ -2147483648
bx lr
_f11:
bic r0, r0, #2 , 2 @ -2147483648
bx lr
instead of:
_f7:
fmsr s0, r0
fnegs s0, s0
fmrs r0, s0
bx lr
_f11:
fmsr s0, r0
fabss s0, s0
fmrs r0, s0
bx lr
llvm-svn: 46423
2008-01-27 23:26:37 +00:00
Chris Lattner
d0496d0433
fix a crash on CodeGen/X86/vector-rem.ll
...
llvm-svn: 46422
2008-01-27 23:21:58 +00:00
Chris Lattner
d329270854
Add support for frameworks. Patch by Shantonu Sen!
...
llvm-svn: 46421
2008-01-27 22:58:59 +00:00
Owen Anderson
9a8c890c02
Reg alloc doesn't really need LiveVariables.
...
llvm-svn: 46420
2008-01-27 22:00:00 +00:00
Owen Anderson
e913aad94e
Fixes for BreakCriticalMachineCodeEdge by Fernando.
...
llvm-svn: 46419
2008-01-27 19:51:03 +00:00
Nick Lewycky
efb16f7057
Be more careful modifying the use_list while also iterating through it.
...
llvm-svn: 46417
2008-01-27 18:35:00 +00:00
Duncan Sands
053c9871cd
Revert r46393: readonly/readnone functions are no
...
longer allowed to write through byval arguments.
llvm-svn: 46416
2008-01-27 18:12:58 +00:00
Chris Lattner
888560d62c
Implement some dag combines that allow doing fneg/fabs/fcopysign in integer
...
registers if used by a bitconvert or using a bitconvert. This allows us to
avoid constant pool loads and use cheaper integer instructions when the
values come from or end up in integer regs anyway. For example, we now
compile CodeGen/X86/fp-in-intregs.ll to:
_test1:
movl $2147483648, %eax
xorl 4(%esp), %eax
ret
_test2:
movl $1065353216, %eax
orl 4(%esp), %eax
andl $3212836864, %eax
ret
Instead of:
_test1:
movss 4(%esp), %xmm0
xorps LCPI2_0, %xmm0
movd %xmm0, %eax
ret
_test2:
movss 4(%esp), %xmm0
andps LCPI3_0, %xmm0
movss LCPI3_1, %xmm1
andps LCPI3_2, %xmm1
orps %xmm0, %xmm1
movd %xmm1, %eax
ret
bitconverts can happen due to various calling conventions that require
fp values to passed in integer regs in some cases, e.g. when returning
a complex.
llvm-svn: 46414
2008-01-27 17:42:27 +00:00
Chris Lattner
2e4719ec55
add a note
...
llvm-svn: 46413
2008-01-27 07:31:41 +00:00
Chris Lattner
d05d2011d0
Use fldz and fld1 for long double constants instead of a constant pool load.
...
llvm-svn: 46411
2008-01-27 06:19:31 +00:00
Chris Lattner
5e8bf5673b
make isExactlyValue work for long double.
...
llvm-svn: 46410
2008-01-27 06:19:08 +00:00
Bill Wendling
8c491162d2
The CorrelatedExpressions pass is now no more.
...
llvm-svn: 46409
2008-01-27 06:13:32 +00:00
Bill Wendling
60361a16f8
The CorrelatedExpressionElimination pass is known to be buggy. Remove it.
...
This fixes PR1769.
llvm-svn: 46408
2008-01-27 06:11:41 +00:00
Chris Lattner
f1a6c9fe86
For long double constants, print an approximation of their value to the .s file to make it easier to read.
...
llvm-svn: 46407
2008-01-27 06:09:28 +00:00
Chris Lattner
fa1e7eef30
Fold fptrunc(add (fpextend x), (fpextend y)) -> add(x,y), as GCC does.
...
llvm-svn: 46406
2008-01-27 05:29:54 +00:00
Chris Lattner
2dd23b9f32
Add some notes.
...
llvm-svn: 46405
2008-01-26 20:12:07 +00:00
Chris Lattner
250789f1bd
Remove some code for inferring alignment info from the x86 backend
...
now that the dag combiner does it.
llvm-svn: 46404
2008-01-26 20:07:42 +00:00
Chris Lattner
596704405f
New test to verify that "merging 4 loads into a vec load" continues to work and
...
continues to infer alignment info.
llvm-svn: 46403
2008-01-26 20:06:45 +00:00
Chris Lattner
1472c7fe76
make this 64-bit safe
...
llvm-svn: 46402
2008-01-26 19:50:30 +00:00
Chris Lattner
e30e33af4f
Infer alignment of loads and increase their alignment when we can tell they are
...
from the stack. This allows us to compile stack-align.ll to:
_test:
movsd LCPI1_0, %xmm0
movapd %xmm0, %xmm1
*** andpd 4(%esp), %xmm1
andpd _G, %xmm0
addsd %xmm1, %xmm0
movl 20(%esp), %eax
movsd %xmm0, (%eax)
ret
instead of:
_test:
movsd LCPI1_0, %xmm0
** movsd 4(%esp), %xmm1
** andpd %xmm0, %xmm1
andpd _G, %xmm0
addsd %xmm1, %xmm0
movl 20(%esp), %eax
movsd %xmm0, (%eax)
ret
llvm-svn: 46401
2008-01-26 19:45:50 +00:00
Chris Lattner
364963d41c
remove a useless xfailed test.
...
llvm-svn: 46400
2008-01-26 19:35:46 +00:00
Duncan Sands
dc157a4f0a
Invert this test, because it is wrong if we allow
...
readonly functions to use byval parameters as local
storage (how much do we want this?).
llvm-svn: 46399
2008-01-26 12:33:01 +00:00
Bill Wendling
1a17ef02c8
If there's no instructions being emitted on X86 for a function, emit a
...
nop. Emit the nop directly for PPC.
llvm-svn: 46398
2008-01-26 09:03:52 +00:00
Bill Wendling
a60c61dc1a
Need to convert to LLVM code and not C.
...
llvm-svn: 46397
2008-01-26 06:56:08 +00:00
Bill Wendling
0b973210f8
Rename the .c to .ll
...
llvm-svn: 46396
2008-01-26 06:53:40 +00:00
Bill Wendling
0f69974fdb
Move testcase to the code gen directory.
...
llvm-svn: 46395
2008-01-26 06:53:06 +00:00
Bill Wendling
5079483957
If there are no machine instructions emitted for a function, then insert
...
a "nop" instruction so that we don't have the function's label associated
with something that it's not supposed to be associated with.
llvm-svn: 46394
2008-01-26 06:51:24 +00:00
Duncan Sands
c4dc3dc3a2
Create an explicit copy for byval parameters even
...
when inlining a readonly function.
llvm-svn: 46393
2008-01-26 06:41:49 +00:00
Anders Carlsson
8a88c3815a
Tweaks to EmitLValue in CGExprConstant. Patch by Eli Friedman.
...
llvm-svn: 46389
2008-01-26 04:30:23 +00:00
Anders Carlsson
a413911373
Add CodeGen for AddrOf in constant initializers. Original patch by Eli Friedman.
...
llvm-svn: 46388
2008-01-26 02:08:50 +00:00
Bill Wendling
0862e3421d
If we have a function like this:
...
void bork() {
int *address = 0;
*address = 0;
}
It's compiled into LLVM code that looks like this:
define void @bork() noreturn nounwind {
entry:
unreachable
}
This is bad on some platforms (like PPC) because it will generate the label for
the function but no body. The label could end up being associated with some
non-code related stuff, like a section. This places a "trap" instruction if the
SimplifyCFG pass removed all code from the function leaving only one
"unreachable" instruction.
llvm-svn: 46387
2008-01-26 01:43:44 +00:00
Anders Carlsson
610ee7134e
Factor out the constant generation into its own file.
...
llvm-svn: 46386
2008-01-26 01:36:00 +00:00
Devang Patel
8797851fbe
Add another testcase.
...
llvm-svn: 46385
2008-01-26 01:21:48 +00:00
Chris Lattner
31e9edce1c
Fix some bugs in SimplifyNodeWithTwoResults where it would call deletenode to
...
delete a node even if it was not dead in some cases. Instead, just add it to
the worklist. Also, make sure to use the CombineTo methods, as it was doing
things that were unsafe: the top level combine loop could touch dangling memory.
This fixes CodeGen/Generic/2008-01-25-dag-combine-mul.ll
llvm-svn: 46384
2008-01-26 01:09:19 +00:00
Chris Lattner
720d8999c7
don't bother making x&-1 only to simplify it in dag combine. This commonly occurs expanding i64 ops.
...
llvm-svn: 46383
2008-01-26 01:05:42 +00:00
Evan Cheng
2df73ea849
New test case.
...
llvm-svn: 46382
2008-01-26 00:35:43 +00:00
Ted Kremenek
95a123c0ec
Added back logic in patch r46361 ( http://llvm.org/viewvc/llvm-project?rev=46361&view=rev ) with the addition of
...
some previously missing NULL pointer checks.
Modified the UninitializedValues analysis to not expect that every Expr* at the
block-level is a block-level expression (we probably need to change the name of
such expressions to something truer to their meaning).
llvm-svn: 46380
2008-01-26 00:03:27 +00:00
Ted Kremenek
5588c9e9ce
Implemented transfer function for '/='.
...
llvm-svn: 46379
2008-01-25 23:45:34 +00:00
Ted Kremenek
2b8a7c80b8
Further refactoring of transfer functions by having APSIntSetOp take
...
a template-template parameter.
llvm-svn: 46378
2008-01-25 23:43:12 +00:00
Chris Lattner
cb3cf546c3
reduce indentation
...
llvm-svn: 46377
2008-01-25 23:34:24 +00:00
Ted Kremenek
0cb1ba2c5e
Reverting r46361 ( http://llvm.org/viewvc/llvm-project?rev=46361&view=rev ) until
...
I diagnose the source of the failures it causes in the test suite.
llvm-svn: 46376
2008-01-25 23:22:27 +00:00
Ted Kremenek
ec5a444de6
Renamed RValueDisjunctiveEqual to RValEqualityORSet.
...
Renamed RValueConjunctiveUnequal to RValInequalityANDSet.
Refactored add/subtract/multiple (and now divide) operations for
RValEqualityORSet to be based on a single template function.
llvm-svn: 46374
2008-01-25 22:55:56 +00:00
Chris Lattner
0af861c43a
add a testcase for a bug Duncan pointed out.
...
llvm-svn: 46372
2008-01-25 22:36:24 +00:00
Steve Naroff
fda820970a
Add more support for Apple's "private extern" extension...
...
llvm-svn: 46371
2008-01-25 22:14:40 +00:00
Ted Kremenek
109e362fbd
Fixed 80 col. violation.
...
llvm-svn: 46370
2008-01-25 22:07:26 +00:00
Duncan Sands
f52faf9a64
Do this more neatly.
...
llvm-svn: 46369
2008-01-25 22:06:51 +00:00
Ted Kremenek
555855c779
Renamed RValueMayEqualSet to RValueDisjunctiveEqual.
...
llvm-svn: 46368
2008-01-25 22:06:07 +00:00
Chris Lattner
77927cc33c
Add support for dispatching an objc message to a variable
...
in an initializer list.
llvm-svn: 46367
2008-01-25 19:43:26 +00:00
Chris Lattner
8917c5ace2
First half of a fix for the "objc message send in initializer" bug. This only
...
handles message sends with typenames to start with.
llvm-svn: 46366
2008-01-25 19:37:24 +00:00
Chris Lattner
e10c6da41e
Factor a complex predicate out to a helper method.
...
llvm-svn: 46365
2008-01-25 19:25:00 +00:00