- Apr 11, 2005
-
-
Chris Lattner authored
long long test2(unsigned A, unsigned B) { return ((unsigned long long)A << 32) + B; } is equivalent to this: long long test1(unsigned A, unsigned B) { return ((unsigned long long)A << 32) | B; } Now they are both codegen'd to this on ppc: _test2: blr or this on x86: test2: movl 4(%esp), %edx movl 8(%esp), %eax ret llvm-svn: 21231
-
Chris Lattner authored
masking shifts. This fixes the miscompilation of this: long long test1(unsigned A, unsigned B) { return ((unsigned long long)A << 32) | B; } into this: test1: movl 4(%esp), %edx movl %edx, %eax orl 8(%esp), %eax ret allowing us to generate this instead: test1: movl 4(%esp), %edx movl 8(%esp), %eax ret llvm-svn: 21230
-
Chris Lattner authored
llvm-svn: 21228
-
Chris Lattner authored
llvm-svn: 21227
-
Chris Lattner authored
llvm-svn: 21226
-
Chris Lattner authored
Refactor how . instructions are handled. In particular, instead of passing the RC flag all the way up the inheritance hierarchy, just make a new tblgen class 'DOT' which can be added to an instruction definition. For example, instead of this: -def AND : XForm_6<31, 28, 0, 0, 0, (ops GPRC:$rA, GPRC:$rS, GPRC:$rB), -let Defs = [CR0] in -def ANDo : XForm_6<31, 28, 1, 0, 0, (ops GPRC:$rA, GPRC:$rS, GPRC:$rB), - "and. $rA, $rS, $rB">; We now have this: +def AND : XForm_6<31, 28, 0, 0, (ops GPRC:$rA, GPRC:$rS, GPRC:$rB), "and $rA, $rS, $rB">; llvm-svn: 21225
-
Duraid Madina authored
llvm-svn: 21224
-
Duraid Madina authored
llvm-svn: 21223
-
Nate Begeman authored
(1.5%) instructions in 186.crafty llvm-svn: 21222
-
Duraid Madina authored
* clean up immediates (we use 14, 22 and 64 bit immediates now. sane.) * fold r0/f0/f1 registers into comparisons against 0/0.0/1.0 * fix nasty thinko - didn't use two-address form of conditional add for extending bools to integers, so occasionally there would be garbage in the result. it's amazing how often zeros are just sitting around in registers ;) - this should fix a bunch of tests. llvm-svn: 21221
-
Reid Spencer authored
the program name as the first argument. Thanks go to Markus Oberhumer for noticing this problem. llvm-svn: 21220
-
Jeff Cohen authored
llvm-svn: 21216
-
Jeff Cohen authored
llvm-svn: 21215
-
Nate Begeman authored
Fix libcall code to not crash or assert looking for an ADJCALLSTACKUP node when it is known that there is no ADJCALLSTACKDOWN to match. Expand i64 multiply when ISD::MULHU is legal for the target. llvm-svn: 21214
-
Chris Lattner authored
the result does change as a result of the extend. This improves codegen for Alpha on this testcase: int %a(ushort* %i) { %tmp.1 = load ushort* %i %tmp.2 = cast ushort %tmp.1 to int %tmp.4 = and int %tmp.2, 1 ret int %tmp.4 } Generating: a: ldgp $29, 0($27) ldwu $0,0($16) and $0,1,$0 ret $31,($26),1 instead of: a: ldgp $29, 0($27) ldwu $0,0($16) and $0,1,$0 addl $0,0,$0 ret $31,($26),1 btw, alpha really should switch to livein/outs for args :) llvm-svn: 21213
-
Chris Lattner authored
llvm-svn: 21212
-
- Apr 10, 2005
-
-
Chris Lattner authored
out by Markus F.X.J. Oberhumer. llvm-svn: 21211
-
Chris Lattner authored
llvm-svn: 21210
-
Chris Lattner authored
llvm-svn: 21209
-
Duraid Madina authored
when there are immediates, let's not worry about the memory overhead of this :) * add addU64Imm(uint64_t val) to machineinstrbuilder (seriously: this seems required to support 64-bit immediates cleanly. if it _really_ gets on your nerves, feel free to pull it out ;) ) coming up next week: "all your floating point constants are belong to us" llvm-svn: 21208
-
Nate Begeman authored
llvm-svn: 21207
-
Nate Begeman authored
boundary. llvm-svn: 21206
-
Chris Lattner authored
This gives the optimizer a bit of information about the top-part of the value. llvm-svn: 21205
-
Chris Lattner authored
llvm-svn: 21204
-
Chris Lattner authored
llvm-svn: 21203
-
Nate Begeman authored
have to inform the register allocator it might be stepped on. llvm-svn: 21202
-
Chris Lattner authored
llvm-svn: 21201
-
Chris Lattner authored
llvm-svn: 21200
-
Chris Lattner authored
llvm-svn: 21199
-
Nate Begeman authored
llvm-svn: 21198
-
Nate Begeman authored
llvm-svn: 21197
-
Chris Lattner authored
the new zero extend, not the original operand. This fixes cast bool -> long on ppc. Add an unrelated fixme llvm-svn: 21196
-
Chris Lattner authored
correct. Remove the EmitComparison retvalue, as it is always the first arg. Fix a place where we incorrectly passed in the setcc opcode instead of the setcc number, causing us to miscompile crafty. Crafty now works! llvm-svn: 21195
-
Nate Begeman authored
llvm-svn: 21193
-
Chris Lattner authored
This caused the "use before a def" assertion on some programs. With this patch, 254.gap now passes with the PPC backend. llvm-svn: 21191
-
Chris Lattner authored
that is not careful, so I'm checking it into the generic tests. llvm-svn: 21190
-
- Apr 09, 2005
-
-
Chris Lattner authored
int a(short i) { return i & 1; } as _a: andi. r3, r3, 1 blr instead of: _a: rlwinm r2, r3, 0, 16, 31 andi. r3, r2, 1 blr on ppc. It should also help the other risc targets. llvm-svn: 21189
-
Chris Lattner authored
llvm-svn: 21188
-
Nate Begeman authored
Generate rotate left/right immediate Generate code for brcondtwoway Use new livein/liveout functionality llvm-svn: 21187
-
Chris Lattner authored
llvm-svn: 21185
-