Commit Graph

4647 Commits

Author SHA1 Message Date
Bill Wendling 6f8c9a8372 Update this testcase. The output needs to be disabled to pass.
llvm-svn: 45478
2008-01-01 01:34:36 +00:00
Duncan Sands 57a60f0466 Fix PR1833 - eh.exception and eh.selector return two
values, which means doing extra legalization work.
It would be easier to get this kind of thing right if
there was some documentation...

llvm-svn: 45472
2007-12-31 18:35:50 +00:00
Gordon Henriksen 1862b6daa0 Another backwards compatibility fix.
llvm-svn: 45463
2007-12-30 22:48:58 +00:00
Gordon Henriksen 12c53c8c84 Strengthening this test so it fails in release mode.
llvm-svn: 45446
2007-12-30 05:45:49 +00:00
Gordon Henriksen 1158c533f7 Bindings for instruction calling conventions.
llvm-svn: 45422
2007-12-29 20:45:00 +00:00
Chris Lattner 11cc8b3c14 remove attributions from the rest of the llvm makefiles.
llvm-svn: 45416
2007-12-29 20:11:13 +00:00
Chris Lattner d2b8a36f0e One readme entry is done, one is really easy (Evan, want to investigate
eliminating the llvm.x86.sse2.loadl.pd intrinsic?), one shuffle optzn
may be done (if shufps is better than pinsw, Evan, please review), and
we already know about LICM of simple instructions.

llvm-svn: 45407
2007-12-29 19:31:47 +00:00
Chris Lattner 0d90c8f016 upgrade this test
llvm-svn: 45406
2007-12-29 19:24:06 +00:00
Chris Lattner 3b6a82118b Fold comparisons against a constant nan, and optimize ORD/UNORD
comparisons with a constant.  This allows us to compile isnan to:

_foo:
	fcmpu cr7, f1, f1
	mfcr r2
	rlwinm r3, r2, 0, 31, 31
	blr 

instead of:

LCPI1_0:					;  float
	.space	4
_foo:
	lis r2, ha16(LCPI1_0)
	lfs f0, lo16(LCPI1_0)(r2)
	fcmpu cr7, f1, f0
	mfcr r2
	rlwinm r3, r2, 0, 31, 31
	blr 

llvm-svn: 45405
2007-12-29 08:37:08 +00:00
Chris Lattner 33de0c6e92 this xform is implemented.
llvm-svn: 45404
2007-12-29 08:19:39 +00:00
Chris Lattner 07ccbfa64a Codegen:
as:

_bar:
	pushl	%esi
	subl	$8, %esp
	movl	16(%esp), %esi
	call	L_foo$stub
	fstps	(%esi)
	addl	$8, %esp
	popl	%esi
	#FP_REG_KILL
	ret

instead of:

_bar:
	pushl	%esi
	subl	$8, %esp
	movl	16(%esp), %esi
	call	L_foo$stub
	fstpl	(%esi)
	cvtsd2ss	(%esi), %xmm0
	movss	%xmm0, (%esi)
	addl	$8, %esp
	popl	%esi
	#FP_REG_KILL
	ret

llvm-svn: 45401
2007-12-29 06:57:38 +00:00
Chris Lattner 8013bd339b avoid going through a stack slot to convert from fpstack to xmm reg
if we are just going to store it back anyway.  This improves things 
like:
double foo();
void bar(double *P) { *P = foo(); }

llvm-svn: 45399
2007-12-29 06:41:28 +00:00
Chris Lattner e96658392d dead calls to llvm.stacksave can be deleted, even though they
have potential side-effects.

llvm-svn: 45392
2007-12-29 00:59:12 +00:00
Chris Lattner bc03f70a07 upgrade this test
llvm-svn: 45391
2007-12-29 00:57:06 +00:00
Devang Patel b57ff068cd Test -simplifycfg only.
llvm-svn: 45389
2007-12-28 22:59:48 +00:00
Owen Anderson 3de3f9981e Add a testcase for my recent InstCombine fix, written by Nicholas.
llvm-svn: 45386
2007-12-28 21:08:43 +00:00
Gordon Henriksen 05568bbd98 Adding bindings for target triple and data layout.
llvm-svn: 45369
2007-12-27 20:13:47 +00:00
Chris Lattner bc13df19a8 one fewer uncond branch with my codegenprepare hack for single-mbb backedges.
llvm-svn: 45360
2007-12-26 17:23:47 +00:00
Gordon Henriksen d89e645c38 Tests for changes made in r45356, where IPO optimizations would drop
collector algorithms.

llvm-svn: 45357
2007-12-26 02:47:37 +00:00
Gordon Henriksen b969c5981b GC poses hazards to the inliner. Consider:
define void @f() {
            ...
            call i32 @g()
            ...
    }

    define void @g() {
            ...
    }

The hazards are:

  - @f and @g have GC, but they differ GC. Inlining is invalid. This
    may never occur.
  - @f has no GC, but @g does. g's GC must be propagated to @f.

The other scenarios are safe:

  - @f and @g have the same GC.
  - @f and @g have no GC.
  - @g has no GC.

This patch adds inliner checks for the former two scenarios.

llvm-svn: 45351
2007-12-25 03:10:07 +00:00
Gordon Henriksen fb56bde933 Noting and enforcing that GC intrinsics are valid only within a
function with GC.

This will catch the error when the inliner inlines a function with
GC into a caller with no GC.

llvm-svn: 45350
2007-12-25 02:31:26 +00:00
Gordon Henriksen 9157c499fc Adjusting verification of "llvm.gc*" intrinsic prototypes to match
LangRef.

llvm-svn: 45349
2007-12-25 02:02:10 +00:00
Gordon Henriksen 2a8cd89d03 C and Ocaml bindings for ExecutionEngine (i.e., the JIT compiler).
llvm-svn: 45335
2007-12-23 16:59:28 +00:00
Gordon Henriksen 0c43064daf Fix a partial application typo.
llvm-svn: 45317
2007-12-22 19:41:30 +00:00
Chris Lattner 74b2ab59fd implement InstCombine/shift-trunc-shift.ll. This allows
us to compile:
#include <math.h>
int t1(double d) { return signbit(d); }

into:

_t1:
	movd	%xmm0, %rax
	shrq	$63, %rax
	ret

instead of:

_t1:
	movd	%xmm0, %rax
	shrq	$32, %rax
	shrl	$31, %eax
	ret

on x86-64.

llvm-svn: 45311
2007-12-22 09:07:47 +00:00
Devang Patel 7a2c66b11e If succ has succ itself as one of the predecessors then do
not merge current bb and succ even if bb's terminator is
unconditional branch to succ.

llvm-svn: 45305
2007-12-22 01:32:53 +00:00
Duncan Sands 8c5822802e Get the verifier to check attributes on calls as well
as on functions.  Make it verify invokes and not just
ordinary calls.  As a (desired) side-effect, it is no
longer legal to have call attributes on arguments that
are being passed to the varargs part of a varargs
function (llvm-as drops them on the floor anyway).

llvm-svn: 45286
2007-12-21 19:19:01 +00:00
Duncan Sands 6a7703ed63 Make DAE not wipe out attributes on calls, and not drop
return attributes on the floor.  In the case of a call
to a varargs function where the varargs arguments are
being removed, any call attributes on those arguments
need to be dropped.  I didn't do this because I plan to
make it illegal to have such attributes (see next patch).
With this change, compiling the gcc filter2 eh test at -O0
and then running opt -std-compile-opts on it results in
a correctly working program (compiling at -O1 or higher
results in the test failing due to a problem with how we
output eh info into the IR).

llvm-svn: 45285
2007-12-21 19:16:16 +00:00
Christopher Lamb 7d82bc46b8 Implement review feedback, including additional transforms
(icmp slt (sub A B) 1) -> (icmp sle A B)
icmp sgt (sub A B) -1) -> (icmp sge A B)

and add testcase.

llvm-svn: 45256
2007-12-20 07:21:11 +00:00
Evan Cheng ddc9af11f0 Remove xfail. This is fixed.
llvm-svn: 45254
2007-12-20 02:25:21 +00:00
Scott Michel 5f1470f03a More working CellSPU tests:
- vec_const.ll: Vector constant loads
- immed64.ll: i64, f64 constant loads

llvm-svn: 45242
2007-12-20 00:44:13 +00:00
Gordon Henriksen 59db63d5fc Use a module to group calling convention values, too.
llvm-svn: 45236
2007-12-20 00:13:26 +00:00
Gordon Henriksen eb4ce98f98 Using modules to group enumerations in Ocaml bindings.
llvm-svn: 45229
2007-12-19 22:54:12 +00:00
Gordon Henriksen 34eb6d877e Adding bindings for memory buffers and module providers. Switching
to exceptions rather than variants for error handling in Ocaml.

llvm-svn: 45226
2007-12-19 22:30:40 +00:00
Scott Michel 5ecac82f71 CellSPU testcase, extract_elt.ll: extract vector element.
llvm-svn: 45219
2007-12-19 21:17:42 +00:00
Duncan Sands aa31b92508 When inlining through an 'nounwind' call, mark inlined
calls 'nounwind'.  It is important for correct C++
exception handling that nounwind markings do not get
lost, so this transformation is actually needed for
correctness.

llvm-svn: 45218
2007-12-19 21:13:37 +00:00
Scott Michel a246e09aa0 More working CellSPU test cases:
- call.ll: Function call
- ctpop.ll: Count population
- dp_farith.ll: DP arithmetic
- eqv.ll: Equivalence primitives
- fcmp.ll: SP comparisons
- fdiv.ll: SP division
- fneg-fabs.ll: SP negation, aboslute value
- int2fp.ll: Integer -> SP conversion
- rotate_ops.ll: Rotation primitives
- select_bits.ll: (a & c) | (b & ~c) bit selection
- shift_ops.ll: Shift primitives
- sp_farith.ll: SP arithmentic

llvm-svn: 45217
2007-12-19 20:50:49 +00:00
Scott Michel 098c113bc8 Two more test cases: or_ops.ll (arithmetic or operations) and vecinsert.ll
(vector insertions)

llvm-svn: 45216
2007-12-19 20:15:47 +00:00
Scott Michel 9b834469e0 Add new immed16.ll test case, fix CellSPU errata to make test case work.
llvm-svn: 45196
2007-12-19 07:35:06 +00:00
Christopher Lamb 74dbad9216 Remove an orthogonal transformation of the selection condition from my most recent submission.
llvm-svn: 45169
2007-12-18 20:30:28 +00:00
Evan Cheng 483a969ece Fix PR1872: SrcValue and SrcValueOffset should not be used to compute load / store node id.
llvm-svn: 45167
2007-12-18 19:38:14 +00:00
Christopher Lamb 30291f4a30 Fix typos.
llvm-svn: 45159
2007-12-18 09:45:40 +00:00
Christopher Lamb 8b09a464b4 Fold certain additions through selects (and their compares) so as to eliminate subtractions. This code is often produced by the SMAX expansion in SCEV.
This implements test/Transforms/InstCombine/2007-12-18-AddSelCmpSub.ll

llvm-svn: 45158
2007-12-18 09:34:41 +00:00
Evan Cheng 91e0fc9cb4 FIX for PR1799: When a load is unfolded from an instruction, check if it is a new node. If not, do not create a new SUnit.
llvm-svn: 45157
2007-12-18 08:42:10 +00:00
Christopher Lamb ac7d631ed2 Don't forget to print address space qualifiers when printing out the type table! Thanks to Gordon Henriksen for pointing this out.
llvm-svn: 45147
2007-12-18 03:49:35 +00:00
Dale Johannesen a56aab57e9 Testcase for preceding FE fix
llvm-svn: 45144
2007-12-18 01:58:38 +00:00
Scott Michel 8172f85e2f i32 immediate constant test case for CellSPU
llvm-svn: 45134
2007-12-17 23:45:52 +00:00
Evan Cheng 0e179d015f Bring back int_x86_sse2_movl_dq intrinsic for backward compatibility. Make sure
it's auto-upgraded to a shufflevector instruction.

llvm-svn: 45131
2007-12-17 22:33:23 +00:00
Scott Michel c5cccb9e60 - Restore some i8 functionality in CellSPU
- New test case: nand.ll

llvm-svn: 45130
2007-12-17 22:32:34 +00:00
Duncan Sands b5a79d0eaa Make invokes of inline asm legal. Teach codegen
how to lower them (with no attempt made to be
efficient, since they should only occur for
unoptimized code).

llvm-svn: 45108
2007-12-17 18:08:19 +00:00
Gordon Henriksen 557fb1451e Disabling a RUN line that's broken until addrspace roundtrips
through llvm-as|llvm-dis.

llvm-svn: 45097
2007-12-17 16:09:28 +00:00
Gordon Henriksen 5a3fe03784 C and Ocaml bindings for address spaces, for that burgeoning market
for Ocaml-based compilers targeting embedded devices. :)

llvm-svn: 45096
2007-12-17 16:08:32 +00:00
Duncan Sands 8e4847ee95 Make instcombine promote inline asm calls to 'nounwind'
calls.  Remove special casing of inline asm from the
inliner.  There is a potential problem: the verifier
rejects invokes of inline asm (not sure why).  If an
asm call is not marked "nounwind" in some .ll, and
instcombine is not run, but the inliner is run, then
an illegal module will be created.  This is bad but
I'm not sure what the best approach is.  I'm tempted
to remove the check in the verifier...

llvm-svn: 45073
2007-12-16 15:51:49 +00:00
Evan Cheng 23d2d4dc6c Make better use of instructions that clear high bits; fix various 2-wide shuffle bugs.
llvm-svn: 45058
2007-12-15 03:00:47 +00:00
Scott Michel 0aa7133f82 Start committing working test cases for CellSPU.
llvm-svn: 45050
2007-12-15 00:38:50 +00:00
Duncan Sands 1202d1b1c4 Teach the interpreter to read and write memory in the
endianness of the target not of the host.  Done by the
simple expedient of reversing bytes for primitive types
if the host and target endianness don't match.  This is
correct for integer and pointer types.  I don't know if
it is correct for floating point types.

llvm-svn: 45039
2007-12-14 19:38:31 +00:00
Dan Gohman 11352df8e4 Don't redirect stderr when it isn't needed.
llvm-svn: 45033
2007-12-14 15:15:11 +00:00
Evan Cheng 0e6408124e Fix ctlz and cttz. llvm definition requires them to return number of bits in of the src type when value is zero.
llvm-svn: 45029
2007-12-14 08:30:15 +00:00
Anders Carlsson f924f34b6b All MMX shift instructions took a <2 x i32> vector as the shift amount parameter. Change this to be <1 x i64> instead, which matches the assembler instruction.
llvm-svn: 45027
2007-12-14 06:38:54 +00:00
Evan Cheng e9fbc3f014 Implement ctlz and cttz with bsr and bsf.
llvm-svn: 45024
2007-12-14 02:13:44 +00:00
Evan Cheng 37c36ed79a Be extra careful with extension use optimation. Now turned on by default.
llvm-svn: 44981
2007-12-13 03:32:53 +00:00
Zhou Sheng 461d8419a7 Remove this testcase as it will always fail on
platform like Darwin.

llvm-svn: 44977
2007-12-13 02:03:57 +00:00
Evan Cheng 827d30db19 Fold some and + shift in x86 addressing mode.
llvm-svn: 44970
2007-12-13 00:43:27 +00:00
Evan Cheng 6e68381e02 Implicit def instructions, e.g. X86::IMPLICIT_DEF_GR32, are always re-materializable and they should not be spilled.
llvm-svn: 44960
2007-12-12 23:12:09 +00:00
Dan Gohman 7a7742c2fe Allow vector integer constants to be created with
SelectionDAG::getConstant, in the same way as vector floating-point
constants. This allows the legalize expansion code for @llvm.ctpop and
friends to be usable with vector types.

llvm-svn: 44954
2007-12-12 22:21:26 +00:00
Wojciech Matyjewicz 309e5a723b 1. "Upgrage" comments.
2. Using zero-extended value of Scale and unsigned division is safe provided
   that Scale doesn't have the sign bit set.
   Previously these 2 instructions:
        %p = bitcast [100 x {i8,i8,i8}]* %x to i8*
        %q = getelementptr i8* %p, i32 -4
   were combined into:
        %q = getelementptr [100 x { i8, i8, i8 }]* %x, i32 0,
               i32 1431655764, i32 0
   what was incorrect.

llvm-svn: 44936
2007-12-12 15:21:32 +00:00
Christopher Lamb 25f5076612 Implement part of review feedback for address spaces.
llvm-svn: 44933
2007-12-12 08:44:39 +00:00
Evan Cheng 0f42730722 Use shuffles to implement insert_vector_elt for i32, i64, f32, and f64.
llvm-svn: 44929
2007-12-12 07:55:34 +00:00
Evan Cheng 0a1254f634 Add a test case for -optimize-ext-uses.
llvm-svn: 44928
2007-12-12 07:54:08 +00:00
Evan Cheng 2a98956796 Lower a build_vector with all constants into a constpool load unless it can be done with a move to low part.
llvm-svn: 44921
2007-12-12 06:45:40 +00:00
Zhou Sheng ed5d693d67 Fixed PR1629.
Make lli interpreter correctly call external functions sin()/cos(),
__cxa_guard_acquire() and __cxa_guard_release().

llvm-svn: 44910
2007-12-12 04:55:43 +00:00
Gordon Henriksen 0a68fe2ffc Add (very basic) bindings for ModuleProvider.
llvm-svn: 44899
2007-12-12 01:04:30 +00:00
Dan Gohman 5e1f8472d2 Rename these tests to use the appropriate suffixes.
llvm-svn: 44867
2007-12-11 15:55:52 +00:00
Dan Gohman b582867567 Use not instead of ignore when an exit status is expected to always
be non-zero.

llvm-svn: 44866
2007-12-11 15:50:23 +00:00
Dan Gohman cfed707c12 Don't redirect stderr when it isn't needed.
llvm-svn: 44865
2007-12-11 15:41:11 +00:00
Christopher Lamb 54dd24c2a7 Implement address space attribute for LLVM pointer types. Address spaces are
regions of memory that have a target specific relationship, as described in the 
Embedded C Technical Report. 

This also implements the 2007-12-11-AddressSpaces test, 
which demonstrates how address space attributes can be used in LLVM IR.

In addition, this patch changes the bitcode signature for stores (in a backwards 
compatible manner), such that the pointer type, rather than the pointee type, is 
encoded. This permits type information in the pointer (e.g. address space) to be 
preserved for stores.

LangRef updates are forthcoming.

llvm-svn: 44858
2007-12-11 08:59:05 +00:00
Chris Lattner 6a6b3fb62b Implement constant folding if vector<->vector bitcasts where the number
of source/dest elements changes.  This implements
test/Transforms/InstCombine/bitcast-vector-fold.ll

llvm-svn: 44855
2007-12-11 07:29:44 +00:00
Evan Cheng 4fbf459549 - Improved v8i16 shuffle lowering. It now uses pshuflw and pshufhw as much as
possible before resorting to pextrw and pinsrw.
- Better codegen for v4i32 shuffles masquerading as v8i16 or v16i8 shuffles.
- Improves (i16 extract_vector_element 0) codegen by recognizing
  (i32 extract_vector_element 0) does not require a pextrw.

llvm-svn: 44836
2007-12-11 01:46:18 +00:00
Gordon Henriksen 2b0eed278b Adding Ocaml bindings for the bitreader as requested by Sarah
Thompson. Usage should be something like this:

open Llvm
open Llvm_bitreader

match read_bitcode_file fn with
  | Bitreader_failure msg ->
      prerr_endline msg
  | Bitreader_success m -> 
      ...;
      dispose_module m

Compile with: ocamlc llvm.cma llvm_bitreader.cma
              ocamlopt llvm.cmxa llvm_bitreader.cmxa

llvm-svn: 44824
2007-12-11 00:20:48 +00:00
Chris Lattner d2265b45ae Fix PR1850 by removing an unsafe transformation from VMCore/ConstantFold.cpp.
Reimplement the xform in Analysis/ConstantFolding.cpp where we can use
targetdata to validate that it is safe.  While I'm in there, fix some const
correctness issues and generalize the interface to the "operand folder".

llvm-svn: 44817
2007-12-10 22:53:04 +00:00
Duncan Sands 9f76be61d1 Make PruneEH update the nounwind/noreturn attributes
on functions as it calculates them.

llvm-svn: 44802
2007-12-10 19:09:40 +00:00
Duncan Sands 5c65cb4633 Fix PR1836: in the interpreter, read and write apints
using the minimum possible number of bytes.  For little
endian targets run on little endian machines, apints are
stored in memory from LSB to MSB as before.  For big endian
targets on big endian machines they are stored from MSB to
LSB which wasn't always the case before (if the target and
host endianness doesn't match values are stored according
to the host's endianness).  Doing this requires knowing the
endianness of the host, which is determined when configuring -
thanks go to Anton for this.  Only having access to little
endian machines I was unable to properly test the big endian
part, which is also the most complicated...

llvm-svn: 44796
2007-12-10 17:43:13 +00:00
Christopher Lamb d202e03fe5 Improve branch folding by recgonizing that explict successor relationships impact the value of fall-through choices.
llvm-svn: 44785
2007-12-10 07:24:06 +00:00
Gordon Henriksen 71183b6739 Adding a collector name attribute to Function in the IR. These
methods are new to Function:

  bool hasCollector() const;
  const std::string &getCollector() const;
  void setCollector(const std::string &);
  void clearCollector();

The assembly representation is as such:

  define void @f() gc "shadow-stack" { ...

The implementation uses an on-the-side table to map Functions to 
collector names, such that there is no overhead. A StringPool is 
further used to unique collector names, which are extremely
likely to be unique per process.

llvm-svn: 44769
2007-12-10 03:18:06 +00:00
Gordon Henriksen ad80af9677 Upgrading this test to 2.0 .ll syntax.
llvm-svn: 44738
2007-12-09 15:03:01 +00:00
Chris Lattner 3f42d12072 Fix PR1782, patch by Wojtek Matyjewicz!
llvm-svn: 44733
2007-12-09 07:35:13 +00:00
Chris Lattner f47015bc74 Fix a significant code quality regression I introduced on PPC64 quite
a while ago.  We now produce:

_foo:
	mflr r0
	std r0, 16(r1)
	ld r2, 16(r1)
	std r2, 0(r3)
	ld r0, 16(r1)
	mtlr r0
	blr 

instead of:

_foo:
	mflr r0
	std r0, 16(r1)
	lis r0, 0
	ori r0, r0, 16
	ldx r2, r1, r0
	std r2, 0(r3)
	ld r0, 16(r1)
	mtlr r0
	blr 

for:

void foo(void **X) {
  *X = __builtin_return_address(0);
}

on ppc64.

llvm-svn: 44701
2007-12-08 07:04:58 +00:00
Chris Lattner f6a8156e4f implement __builtin_return_addr(0) on ppc.
llvm-svn: 44700
2007-12-08 06:59:59 +00:00
Evan Cheng bfd373a53e Much improved v8i16 shuffles. (Step 1).
llvm-svn: 44676
2007-12-07 08:07:39 +00:00
Evan Cheng 26593a04db New test case.
llvm-svn: 44672
2007-12-07 01:48:46 +00:00
Evan Cheng 5cb41390ab Fix a bogus test case.
llvm-svn: 44668
2007-12-06 22:12:45 +00:00
Evan Cheng 8393dc7378 Turning simple splitting on. Start testing new coalescer heuristics as new llcbeta.
llvm-svn: 44660
2007-12-06 08:54:31 +00:00
Chris Lattner eedaf92fcf third time around: instead of disabling this completely,
only disable it if we don't know it will be obviously profitable.
Still fixme, but less so. :)

llvm-svn: 44658
2007-12-06 07:47:55 +00:00
Chris Lattner b5fdfb9612 Actually, disable this code for now. More analysis and improvements to
the X86 backend are needed before this should be enabled by default.

llvm-svn: 44657
2007-12-06 07:44:31 +00:00
Chris Lattner 7c709a5d08 implement a readme entry, compiling the code into:
_foo:
	movl	$12, %eax
	andl	4(%esp), %eax
	movl	_array(%eax), %eax
	ret

instead of:

_foo:
	movl	4(%esp), %eax
	shrl	$2, %eax
	andl	$3, %eax
	movl	_array(,%eax,4), %eax
	ret

As it turns out, this triggers all the time, in a wide variety of
situations, for example, I see diffs like this in various programs:

-       movl    8(%eax), %eax
-       shll    $2, %eax
-       andl    $1020, %eax
-       movl    (%esi,%eax), %eax
+       movzbl  8(%eax), %eax
+       movl    (%esi,%eax,4), %eax


-       shll    $2, %edx
-       andl    $1020, %edx
-       movl    (%edi,%edx), %edx
+       andl    $255, %edx
+       movl    (%edi,%edx,4), %edx

Unfortunately, I also see stuff like this, which can be fixed in the
X86 backend:

-       andl    $85, %ebx
-       addl    _bit_count(,%ebx,4), %ebp
+       shll    $2, %ebx
+       andl    $340, %ebx
+       addl    _bit_count(%ebx), %ebp

llvm-svn: 44656
2007-12-06 07:33:36 +00:00
Chris Lattner dfa39289a5 fix this when run on non x86 hosts.
llvm-svn: 44645
2007-12-06 01:05:52 +00:00
Evan Cheng 7fc1d98353 Fix for PR1831: if all defs of an interval are re-materializable, then it's a preferred spill candiate.
llvm-svn: 44644
2007-12-06 00:01:56 +00:00
Devang Patel bd75910fa7 If ExitValue operand is also defined in Loop header then
insert new ExitValue after this operand definition.

This fixes PR1828.

llvm-svn: 44539
2007-12-03 19:17:21 +00:00
Gordon Henriksen e000c6022f Fix a typo noticed by Alain Frisch.
llvm-svn: 44493
2007-12-01 20:59:23 +00:00
Evan Cheng 69fda0a716 Allow some reloads to be folded in multi-use cases. Specifically testl r, r -> cmpl [mem], 0.
llvm-svn: 44479
2007-12-01 02:07:52 +00:00