| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
| |
llvm-svn: 35960
|
| |
|
|
|
|
| |
less huge code that needs to be cleaned up by sdisel.
llvm-svn: 35959
|
| |
|
|
| |
llvm-svn: 35957
|
| |
|
|
|
|
|
| |
linkage so we only end up with one of them in a program. These are, after
all overloaded and templatish in nature.
llvm-svn: 35956
|
| |
|
|
|
|
|
|
| |
This can happen for intrinsics that are overloaded. In such cases it is
necessary to emit a function prototype before the body of the function
that calls the intrinsic and to ensure we don't emit it multiple times.
llvm-svn: 35954
|
| |
|
|
| |
llvm-svn: 35951
|
| |
|
|
| |
llvm-svn: 35950
|
| |
|
|
|
|
| |
barf when CBE is run with a program that contains these intrinsics.
llvm-svn: 35946
|
| |
|
|
|
|
| |
the size of the value, not just zext. Also, give better names to two BBs.
llvm-svn: 35945
|
| |
|
|
|
|
|
|
| |
class supports. In the case of vectors, this means we often get the wrong
type (e.g. we get v4f32 instead of v8i16). Make sure to convert the vector
result to the right type. This fixes CodeGen/X86/2007-04-11-InlineAsmVectorResult.ll
llvm-svn: 35944
|
| |
|
|
| |
llvm-svn: 35943
|
| |
|
|
| |
llvm-svn: 35941
|
| |
|
|
| |
llvm-svn: 35940
|
| |
|
|
|
|
| |
Implement the "part_set" intrinsic.
llvm-svn: 35938
|
| |
|
|
|
|
|
|
|
| |
handlers (like the pass list). My previous fix only supported *new* command
line options, not additions to old ones.
This fixes test/Feature/load_module.ll
llvm-svn: 35935
|
| |
|
|
| |
llvm-svn: 35926
|
| |
|
|
| |
llvm-svn: 35922
|
| |
|
|
| |
llvm-svn: 35910
|
| |
|
|
|
|
| |
CodeGen/ARM/arm-negative-stride.ll
llvm-svn: 35909
|
| |
|
|
| |
llvm-svn: 35906
|
| |
|
|
| |
llvm-svn: 35905
|
| |
|
|
|
|
|
| |
not retain that name. Not noticed because AsmParser always sets name after
construction. However, llvm2cpp noticed.
llvm-svn: 35903
|
| |
|
|
| |
llvm-svn: 35901
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
icmp slt i32 %X, 0 ; <i1>:0 [#uses=1]
sext i1 %0 to i32 ; <i32>:1 [#uses=1]
into:
%X.lobit = ashr i32 %X, 31 ; <i32> [#uses=1]
This implements InstCombine/icmp.ll:test[34]
llvm-svn: 35891
|
| |
|
|
|
|
| |
Transforms/InstCombine/icmp.ll
llvm-svn: 35890
|
| |
|
|
| |
llvm-svn: 35888
|
| |
|
|
| |
llvm-svn: 35887
|
| |
|
|
| |
llvm-svn: 35886
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
define i32 @test(i32 %X) {
entry:
%Y = and i32 %X, 4 ; <i32> [#uses=1]
icmp eq i32 %Y, 0 ; <i1>:0 [#uses=1]
sext i1 %0 to i32 ; <i32>:1 [#uses=1]
ret i32 %1
}
by moving code out of commonIntCastTransforms into visitZExt. Simplify the
APInt gymnastics in it etc.
llvm-svn: 35885
|
| |
|
|
| |
llvm-svn: 35884
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
allows other simplifications. For example, this compiles:
int isnegative(unsigned int X) {
return !(X < 2147483648U);
}
Into this code:
x86:
movl 4(%esp), %eax
shrl $31, %eax
ret
arm:
mov r0, r0, lsr #31
bx lr
thumb:
lsr r0, r0, #31
bx lr
instead of:
x86:
cmpl $0, 4(%esp)
sets %al
movzbl %al, %eax
ret
arm:
mov r3, #0
cmp r0, #0
movlt r3, #1
mov r0, r3
bx lr
thumb:
mov r2, #1
mov r1, #0
cmp r0, #0
blt LBB1_2 @entry
LBB1_1: @entry
cpy r2, r1
LBB1_2: @entry
cpy r0, r2
bx lr
Testcase here: test/CodeGen/Generic/ispositive.ll
llvm-svn: 35883
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
improves codegen on many architectures. Tests committed as CodeGen/*/iabs.ll
X86 Old: X86 New:
_test: _test:
movl 4(%esp), %ecx movl 4(%esp), %eax
movl %ecx, %eax movl %eax, %ecx
negl %eax sarl $31, %ecx
testl %ecx, %ecx addl %ecx, %eax
cmovns %ecx, %eax xorl %ecx, %eax
ret ret
PPC Old: PPC New:
_test: _test:
cmpwi cr0, r3, -1 srawi r2, r3, 31
neg r2, r3 add r3, r3, r2
bgt cr0, LBB1_2 ; xor r3, r3, r2
LBB1_1: ; blr
mr r3, r2
LBB1_2: ;
blr
ARM Old: ARM New:
_test: _test:
rsb r3, r0, #0 add r3, r0, r0, asr #31
cmp r0, #0 eor r0, r3, r0, asr #31
movge r3, r0 bx lr
mov r0, r3
bx lr
Thumb Old: Thumb New:
_test: _test:
neg r2, r0 asr r2, r0, #31
cmp r0, #0 add r0, r0, r2
bge LBB1_2 eor r0, r2
LBB1_1: @ bx lr
cpy r0, r2
LBB1_2: @
bx lr
Sparc Old: Sparc New:
test: test:
save -96, %o6, %o6 save -96, %o6, %o6
sethi 0, %l0 sra %i0, 31, %l0
sub %l0, %i0, %l0 add %i0, %l0, %l1
subcc %i0, -1, %l1 xor %l1, %l0, %i0
bg .BB1_2 restore %g0, %g0, %g0
nop retl
.BB1_1: nop
or %g0, %l0, %i0
.BB1_2:
restore %g0, %g0, %g0
retl
nop
It also helps alpha/ia64 :)
llvm-svn: 35881
|
| |
|
|
| |
llvm-svn: 35879
|
| |
|
|
| |
llvm-svn: 35878
|
| |
|
|
|
|
|
| |
Put the parameter attributes in their own ParamAttr name space. Adjust the
rest of llvm as a result.
llvm-svn: 35877
|
| |
|
|
|
|
|
| |
and Mach-O systems. Additionally, correct the Mach-O logic code to look at
byte 12 not byte 15. Hopefully this fixes the llvm-ld warning on Darwin.
llvm-svn: 35876
|
| |
|
|
|
|
|
|
|
|
|
| |
others.
We now tolerate small amounts of undefined behavior, better emulating what
would happen if the transaction actually occurred in memory. This fixes
SingleSource/UnitTests/2007-04-10-BitfieldTest.c on PPC, at least until
Devang gets a chance to fix the CFE from doing undefined things with bitfields :)
llvm-svn: 35875
|
| |
|
|
| |
llvm-svn: 35874
|
| |
|
|
| |
llvm-svn: 35869
|
| |
|
|
| |
llvm-svn: 35867
|
| |
|
|
| |
llvm-svn: 35859
|
| |
|
|
|
|
| |
commit a LOT of files.
llvm-svn: 35858
|
| |
|
|
| |
llvm-svn: 35857
|
| |
|
|
| |
llvm-svn: 35856
|
| |
|
|
|
|
| |
InstCombine/set.ll:test25
llvm-svn: 35852
|
| |
|
|
| |
llvm-svn: 35850
|
| |
|
|
|
|
| |
series, I promise.
llvm-svn: 35848
|
| |
|
|
| |
llvm-svn: 35847
|
| |
|
|
| |
llvm-svn: 35846
|
| |
|
|
| |
llvm-svn: 35845
|