- Aug 17, 2005
-
-
Chris Lattner authored
argument is not specified. Implement ReplaceAllUsesWith. llvm-svn: 22834
-
Jim Laskey authored
llvm-svn: 22831
-
Jim Laskey authored
llvm-svn: 22828
-
Chris Lattner authored
Nate noticed in yacr2 (and I know occurs in other places as well). This is still rough, as the critical edge blocks are not intelligently placed but is added to get some idea to see if this improves performance. llvm-svn: 22825
-
Chris Lattner authored
llvm-svn: 22822
-
Jim Laskey authored
Added generic code expansion for [signed|unsigned] i32 to [f32|f64] casts in the legalizer. PowerPC now uses this expansion instead of ISel version. Example: // signed integer to double conversion double f1(signed x) { return (double)x; } // unsigned integer to double conversion double f2(unsigned x) { return (double)x; } // signed integer to float conversion float f3(signed x) { return (float)x; } // unsigned integer to float conversion float f4(unsigned x) { return (float)x; } Byte Code: internal fastcc double %_Z2f1i(int %x) { entry: %tmp.1 = cast int %x to double ; <double> [#uses=1] ret double %tmp.1 } internal fastcc double %_Z2f2j(uint %x) { entry: %tmp.1 = cast uint %x to double ; <double> [#uses=1] ret double %tmp.1 } internal fastcc float %_Z2f3i(int %x) { entry: %tmp.1 = cast int %x to float ; <float> [#uses=1] ret float %tmp.1 } internal fastcc float %_Z2f4j(uint %x) { entry: %tmp.1 = cast uint %x to float ; <float> [#uses=1] ret float %tmp.1 } internal fastcc double %_Z2g1i(int %x) { entry: %buffer = alloca [2 x uint] ; <[2 x uint]*> [#uses=3] %tmp.0 = getelementptr [2 x uint]* %buffer, int 0, int 0 ; <uint*> [#uses=1] store uint 1127219200, uint* %tmp.0 %tmp.2 = cast int %x to uint ; <uint> [#uses=1] %tmp.3 = xor uint %tmp.2, 2147483648 ; <uint> [#uses=1] %tmp.5 = getelementptr [2 x uint]* %buffer, int 0, int 1 ; <uint*> [#uses=1] store uint %tmp.3, uint* %tmp.5 %tmp.9 = cast [2 x uint]* %buffer to double* ; <double*> [#uses=1] %tmp.10 = load double* %tmp.9 ; <double> [#uses=1] %tmp.13 = load double* cast (long* %signed_bias to double*) ; <double> [#uses=1] %tmp.14 = sub double %tmp.10, %tmp.13 ; <double> [#uses=1] ret double %tmp.14 } internal fastcc double %_Z2g2j(uint %x) { entry: %buffer = alloca [2 x uint] ; <[2 x uint]*> [#uses=3] %tmp.0 = getelementptr [2 x uint]* %buffer, int 0, int 0 ; <uint*> [#uses=1] store uint 1127219200, uint* %tmp.0 %tmp.1 = getelementptr [2 x uint]* %buffer, int 0, int 1 ; <uint*> [#uses=1] store uint %x, uint* %tmp.1 %tmp.4 = cast [2 x uint]* %buffer to double* ; <double*> [#uses=1] %tmp.5 = load double* %tmp.4 ; <double> [#uses=1] %tmp.8 = load double* cast (long* %unsigned_bias to double*) ; <double> [#uses=1] %tmp.9 = sub double %tmp.5, %tmp.8 ; <double> [#uses=1] ret double %tmp.9 } internal fastcc float %_Z2g3i(int %x) { entry: %buffer = alloca [2 x uint] ; <[2 x uint]*> [#uses=3] %tmp.0 = getelementptr [2 x uint]* %buffer, int 0, int 0 ; <uint*> [#uses=1] store uint 1127219200, uint* %tmp.0 %tmp.2 = cast int %x to uint ; <uint> [#uses=1] %tmp.3 = xor uint %tmp.2, 2147483648 ; <uint> [#uses=1] %tmp.5 = getelementptr [2 x uint]* %buffer, int 0, int 1 ; <uint*> [#uses=1] store uint %tmp.3, uint* %tmp.5 %tmp.9 = cast [2 x uint]* %buffer to double* ; <double*> [#uses=1] %tmp.10 = load double* %tmp.9 ; <double> [#uses=1] %tmp.13 = load double* cast (long* %signed_bias to double*) ; <double> [#uses=1] %tmp.14 = sub double %tmp.10, %tmp.13 ; <double> [#uses=1] %tmp.16 = cast double %tmp.14 to float ; <float> [#uses=1] ret float %tmp.16 } internal fastcc float %_Z2g4j(uint %x) { entry: %buffer = alloca [2 x uint] ; <[2 x uint]*> [#uses=3] %tmp.0 = getelementptr [2 x uint]* %buffer, int 0, int 0 ; <uint*> [#uses=1] store uint 1127219200, uint* %tmp.0 %tmp.1 = getelementptr [2 x uint]* %buffer, int 0, int 1 ; <uint*> [#uses=1] store uint %x, uint* %tmp.1 %tmp.4 = cast [2 x uint]* %buffer to double* ; <double*> [#uses=1] %tmp.5 = load double* %tmp.4 ; <double> [#uses=1] %tmp.8 = load double* cast (long* %unsigned_bias to double*) ; <double> [#uses=1] %tmp.9 = sub double %tmp.5, %tmp.8 ; <double> [#uses=1] %tmp.11 = cast double %tmp.9 to float ; <float> [#uses=1] ret float %tmp.11 } PowerPC Code: .machine ppc970 .const .align 2 .CPIl1__Z2f1i_0: ; float 0x4330000080000000 .long 1501560836 ; float 4.5036e+15 .text .align 2 .globl l1__Z2f1i l1__Z2f1i: .LBBl1__Z2f1i_0: ; entry xoris r2, r3, 32768 stw r2, -4(r1) lis r2, 17200 stw r2, -8(r1) lfd f0, -8(r1) lis r2, ha16(.CPIl1__Z2f1i_0) lfs f1, lo16(.CPIl1__Z2f1i_0)(r2) fsub f1, f0, f1 blr .const .align 2 .CPIl2__Z2f2j_0: ; float 0x4330000000000000 .long 1501560832 ; float 4.5036e+15 .text .align 2 .globl l2__Z2f2j l2__Z2f2j: .LBBl2__Z2f2j_0: ; entry stw r3, -4(r1) lis r2, 17200 stw r2, -8(r1) lfd f0, -8(r1) lis r2, ha16(.CPIl2__Z2f2j_0) lfs f1, lo16(.CPIl2__Z2f2j_0)(r2) fsub f1, f0, f1 blr .const .align 2 .CPIl3__Z2f3i_0: ; float 0x4330000080000000 .long 1501560836 ; float 4.5036e+15 .text .align 2 .globl l3__Z2f3i l3__Z2f3i: .LBBl3__Z2f3i_0: ; entry xoris r2, r3, 32768 stw r2, -4(r1) lis r2, 17200 stw r2, -8(r1) lfd f0, -8(r1) lis r2, ha16(.CPIl3__Z2f3i_0) lfs f1, lo16(.CPIl3__Z2f3i_0)(r2) fsub f0, f0, f1 frsp f1, f0 blr .const .align 2 .CPIl4__Z2f4j_0: ; float 0x4330000000000000 .long 1501560832 ; float 4.5036e+15 .text .align 2 .globl l4__Z2f4j l4__Z2f4j: .LBBl4__Z2f4j_0: ; entry stw r3, -4(r1) lis r2, 17200 stw r2, -8(r1) lfd f0, -8(r1) lis r2, ha16(.CPIl4__Z2f4j_0) lfs f1, lo16(.CPIl4__Z2f4j_0)(r2) fsub f0, f0, f1 frsp f1, f0 blr llvm-svn: 22814
-
Chris Lattner authored
llvm-svn: 22813
-
- Aug 16, 2005
-
-
Chris Lattner authored
used to tack a register number onto the node. Instead of doing this, make a new node, RegisterSDNode, which is a leaf containing a register number. These three operations just become normal DAG nodes now, instead of requiring special handling. Note that with this change, it is no longer correct to make illegal CopyFromReg/CopyToReg nodes. The legalizer will not touch them, and this is bad, so don't do it. :) llvm-svn: 22806
-
Nate Begeman authored
fixme from the PowerPC backend. Emit slightly better code for legalizing select_cc. llvm-svn: 22805
-
Chris Lattner authored
when printing a node, use it to render target operations with their target instruction name instead of "<<unknown>>". llvm-svn: 22804
-
Chris Lattner authored
llvm-svn: 22802
-
Chris Lattner authored
Split RemoveNodeFromCSEMaps out of DeleteNodesIfDead to do it. llvm-svn: 22801
-
- Aug 14, 2005
-
-
Nate Begeman authored
1. Not selecting the false value of a select_cc in the false arm, which isn't legal for nested selects. 2. Actually returning the node we created and Legalized in the FP_TO_UINT Expander. llvm-svn: 22789
-
Nate Begeman authored
Teach the legalizer to promote FP_TO_UINT to FP_TO_SINT if the wider FP_TO_UINT is also illegal. This allows us on PPC to codegen unsigned short foo(float a) { return a; } as: _foo: .LBB_foo_0: ; entry fctiwz f0, f1 stfd f0, -8(r1) lwz r2, -4(r1) rlwinm r3, r2, 0, 16, 31 blr instead of: _foo: .LBB_foo_0: ; entry fctiwz f0, f1 stfd f0, -8(r1) lwz r2, -4(r1) lis r3, ha16(.CPI_foo_0) lfs f0, lo16(.CPI_foo_0)(r3) fcmpu cr0, f1, f0 blt .LBB_foo_2 ; entry .LBB_foo_1: ; entry fsubs f0, f1, f0 fctiwz f0, f0 stfd f0, -16(r1) lwz r2, -12(r1) xoris r2, r2, 32768 .LBB_foo_2: ; entry rlwinm r3, r2, 0, 16, 31 blr llvm-svn: 22785
-
- Aug 13, 2005
-
-
Nate Begeman authored
assert when creating a select_cc node. llvm-svn: 22780
-
Nate Begeman authored
out into SimplifySelectCC. This allows both ISD::SELECT and ISD::SELECT_CC to use the same set of simplifying folds. llvm-svn: 22779
-
Chris Lattner authored
e.g. (X & 7) >> 3 -> 0 llvm-svn: 22774
-
- Aug 11, 2005
-
-
Nate Begeman authored
integer MPEG encoding loop by a factor of two. llvm-svn: 22758
-
Nate Begeman authored
1. move assertions for node creation to getNode() 2. legalize the values returned in ExpandOp immediately 3. Move select_cc optimizations from SELECT's getNode() to SELECT_CC's, allowing them to be cleaned up significantly. This paves the way to pick up additional optimizations on SELECT_CC, such as sum-of-absolute-differences. llvm-svn: 22757
-
- Aug 10, 2005
-
-
Nate Begeman authored
implement SELECT. llvm-svn: 22755
-
Chris Lattner authored
llvm-svn: 22753
-
Chris Lattner authored
llvm-svn: 22734
-
- Aug 09, 2005
-
-
Chris Lattner authored
llvm-svn: 22731
-
Chris Lattner authored
CC out of the SetCC operation, making SETCC a standard ternary operation and CC's a standard DAG leaf. This will make it possible for other node to use CC's as operands in the future... llvm-svn: 22728
-
- Aug 08, 2005
-
-
Chris Lattner authored
llvm-svn: 22696
-
- Aug 07, 2005
-
-
Chris Lattner authored
llvm-svn: 22691
-
- Aug 05, 2005
-
-
Chris Lattner authored
avoid revisiting nodes more than once. This eliminates a source of potentially exponential behavior. For a small function in 191.fma3d (hexah_stress_divergence_), this speeds up isel from taking > 20mins to taking 0.07s. llvm-svn: 22680
-
Chris Lattner authored
llvm-svn: 22679
-
Chris Lattner authored
yesterday. This fixes whetstone and a bunch of programs in the External tests. llvm-svn: 22678
-
- Aug 04, 2005
-
-
Nate Begeman authored
llvm-svn: 22661
-
Misha Brukman authored
* Add comments to #endif pragmas for readability llvm-svn: 22647
-
- Aug 03, 2005
-
-
Chris Lattner authored
the sequence used for integer ops llvm-svn: 22629
-
- Aug 02, 2005
-
-
Chris Lattner authored
Patch contributed by Jim Laskey! llvm-svn: 22594
-
- Aug 01, 2005
-
-
Chris Lattner authored
llvm-svn: 22570
-
- Jul 30, 2005
-
-
Jeff Cohen authored
llvm-svn: 22565
-
Chris Lattner authored
llvm-svn: 22563
-
Chris Lattner authored
both the src and dest values are legal llvm-svn: 22555
-
- Jul 29, 2005
-
-
Chris Lattner authored
llvm-svn: 22548
-
Chris Lattner authored
a larger integer destination. llvm-svn: 22547
-
Chris Lattner authored
subcases inside, break things out earlier. llvm-svn: 22546
-