| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
by the shr -> [al]shr patch. This was reduced from 176.gcc.
llvm-svn: 31653
|
|
|
|
|
|
| |
add.ll:test33, add.ll:test34, shift-sra.ll:test2
llvm-svn: 31586
|
|
|
|
|
|
| |
case that it bad to do.
llvm-svn: 31563
|
|
|
|
|
|
| |
delete in the first place. This also makes it simpler.
llvm-svn: 31562
|
|
|
|
|
|
| |
loops.
llvm-svn: 31560
|
|
|
|
|
|
|
|
| |
This patch converts the old SHR instruction into two instructions,
AShr (Arithmetic) and LShr (Logical). The Shr instructions now are not
dependent on the sign of their operands.
llvm-svn: 31542
|
|
|
|
| |
llvm-svn: 31431
|
|
|
|
|
|
|
|
|
|
| |
Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting
fall out by removing unused variables. Remaining warnings have to do with
unused functions (I didn't want to delete code without review) and unused
variables in generated code. Maintainers should clean up the remaining
issues when they see them. All changes pass DejaGnu tests and Olden.
llvm-svn: 31380
|
|
|
|
|
|
| |
Replace the REM instruction with UREM, SREM and FREM.
llvm-svn: 31369
|
|
|
|
| |
llvm-svn: 31346
|
|
|
|
|
|
|
| |
result. This can significantly shrink code and exposes identities more
aggressively.
llvm-svn: 31344
|
|
|
|
| |
llvm-svn: 31342
|
|
|
|
|
|
| |
This triggers thousands of times on multisource.
llvm-svn: 31341
|
|
|
|
|
|
|
|
| |
InsertNewInstBefore(new CastInst(Val, ValTy, Val->GetName()), I)
into:
InsertCastBefore(Val, ValTy, I)
llvm-svn: 31204
|
|
|
|
|
|
|
|
| |
Make necessary changes to support DIV -> [SUF]Div. This changes llvm to
have three division instructions: signed, unsigned, floating point. The
bytecode and assembler are bacwards compatible, however.
llvm-svn: 31195
|
|
|
|
|
|
| |
but apparently didn't make it into the final patch.
llvm-svn: 31070
|
|
|
|
|
|
|
|
| |
This patch implements the first increment for the Signless Types feature.
All changes pertain to removing the ConstantSInt and ConstantUInt classes
in favor of just using ConstantInt.
llvm-svn: 31063
|
|
|
|
| |
llvm-svn: 31062
|
|
|
|
|
|
| |
and destination sign may not match but other conditions are met.
llvm-svn: 31056
|
|
|
|
| |
llvm-svn: 31055
|
|
|
|
| |
llvm-svn: 31054
|
|
|
|
|
|
| |
This fixes llvmAsmParser.cpp miscompile by llvm on PowerPC Darwin.
llvm-svn: 31053
|
|
|
|
| |
llvm-svn: 30991
|
|
|
|
| |
llvm-svn: 30967
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SimplifyDemandedBits. The idea is that some operations can be simplified if
not all of the computed elements are needed. Some targets (like x86) have a
large number of intrinsics that operate on a single element, but pass other
elts through unmodified. If those other elements are not needed, the
intrinsics can be simplified to scalar operations, and insertelement ops can
be removed.
This turns (f.e.):
ushort %Convert_sse(float %f) {
%tmp = insertelement <4 x float> undef, float %f, uint 0 ; <<4 x float>> [#uses=1]
%tmp10 = insertelement <4 x float> %tmp, float 0.000000e+00, uint 1 ; <<4 x float>> [#uses=1]
%tmp11 = insertelement <4 x float> %tmp10, float 0.000000e+00, uint 2 ; <<4 x float>> [#uses=1]
%tmp12 = insertelement <4 x float> %tmp11, float 0.000000e+00, uint 3 ; <<4 x float>> [#uses=1]
%tmp28 = tail call <4 x float> %llvm.x86.sse.sub.ss( <4 x float> %tmp12, <4 x float> < float 1.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00 > ) ; <<4 x float>> [#uses=1]
%tmp37 = tail call <4 x float> %llvm.x86.sse.mul.ss( <4 x float> %tmp28, <4 x float> < float 5.000000e-01, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00 > ) ; <<4 x float>> [#uses=1]
%tmp48 = tail call <4 x float> %llvm.x86.sse.min.ss( <4 x float> %tmp37, <4 x float> < float 6.553500e+04, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00 > ) ; <<4 x float>> [#uses=1]
%tmp59 = tail call <4 x float> %llvm.x86.sse.max.ss( <4 x float> %tmp48, <4 x float> zeroinitializer ) ; <<4 x float>> [#uses=1]
%tmp = tail call int %llvm.x86.sse.cvttss2si( <4 x float> %tmp59 ) ; <int> [#uses=1]
%tmp69 = cast int %tmp to ushort ; <ushort> [#uses=1]
ret ushort %tmp69
}
into:
ushort %Convert_sse(float %f) {
entry:
%tmp28 = sub float %f, 1.000000e+00 ; <float> [#uses=1]
%tmp37 = mul float %tmp28, 5.000000e-01 ; <float> [#uses=1]
%tmp375 = insertelement <4 x float> undef, float %tmp37, uint 0 ; <<4 x float>> [#uses=1]
%tmp48 = tail call <4 x float> %llvm.x86.sse.min.ss( <4 x float> %tmp375, <4 x float> < float 6.553500e+04, float undef, float undef, float undef > ) ; <<4 x float>> [#uses=1]
%tmp59 = tail call <4 x float> %llvm.x86.sse.max.ss( <4 x float> %tmp48, <4 x float> < float 0.000000e+00, float undef, float undef, float undef > ) ; <<4 x float>> [#uses=1]
%tmp = tail call int %llvm.x86.sse.cvttss2si( <4 x float> %tmp59 ) ; <int> [#uses=1]
%tmp69 = cast int %tmp to ushort ; <ushort> [#uses=1]
ret ushort %tmp69
}
which improves codegen from:
_Convert_sse:
movss LCPI1_0, %xmm0
movss 4(%esp), %xmm1
subss %xmm0, %xmm1
movss LCPI1_1, %xmm0
mulss %xmm0, %xmm1
movss LCPI1_2, %xmm0
minss %xmm0, %xmm1
xorps %xmm0, %xmm0
maxss %xmm0, %xmm1
cvttss2si %xmm1, %eax
andl $65535, %eax
ret
to:
_Convert_sse:
movss 4(%esp), %xmm0
subss LCPI1_0, %xmm0
mulss LCPI1_1, %xmm0
movss LCPI1_2, %xmm1
minss %xmm1, %xmm0
xorps %xmm1, %xmm1
maxss %xmm1, %xmm0
cvttss2si %xmm0, %eax
andl $65535, %eax
ret
This is just a first step, it can be extended in many ways. Testcase here:
Transforms/InstCombine/vec_demanded_elts.ll
llvm-svn: 30752
|
|
|
|
|
|
|
| |
the alignment when promoting allocations. This implements
InstCombine/cast.ll:test32
llvm-svn: 30682
|
|
|
|
|
|
| |
ConstantBool::getTrue() and ConstantBool::getFalse().
llvm-svn: 30665
|
|
|
|
| |
llvm-svn: 30535
|
|
|
|
|
|
|
| |
this comparison, but never checked it. Whoops, no wonder we miscompiled
177.mesa!
llvm-svn: 30511
|
|
|
|
| |
llvm-svn: 30505
|
|
|
|
| |
llvm-svn: 30504
|
|
|
|
|
|
| |
critical in the linux kernel for pointer analysis correctness
llvm-svn: 30496
|
|
|
|
| |
llvm-svn: 30482
|
|
|
|
| |
llvm-svn: 30465
|
|
|
|
| |
llvm-svn: 30456
|
|
|
|
| |
llvm-svn: 30450
|
|
|
|
|
|
| |
Use isLogicalShift/isArithmeticShift to simplify code.
llvm-svn: 30448
|
|
|
|
| |
llvm-svn: 30405
|
|
|
|
| |
llvm-svn: 30266
|
|
|
|
| |
llvm-svn: 30234
|
|
|
|
|
|
| |
This implements select.ll::test18.
llvm-svn: 30230
|
|
|
|
| |
llvm-svn: 29925
|
|
|
|
| |
llvm-svn: 29911
|
|
|
|
| |
llvm-svn: 29108
|
|
|
|
| |
llvm-svn: 29094
|
|
|
|
| |
llvm-svn: 29093
|
|
|
|
|
|
| |
This implements Transforms/InstCombine/bswap.ll:test[34].
llvm-svn: 29087
|
|
|
|
| |
llvm-svn: 29083
|
|
|
|
| |
llvm-svn: 28972
|
|
|
|
| |
llvm-svn: 28961
|