llvm-6502/lib/Transforms/Scalar
Chris Lattner 11a49f2c0d Turn srem -> urem when neither input has their sign bit set. This triggers
8 times in vortex, allowing the srems to be turned into shrs:

OLD:    %tmp.104 = rem int %tmp.5.i37, 16               ; <int> [#uses=1]
NEW:    %tmp.104 = rem uint %tmp.5.i37, 16              ; <uint> [#uses=0]
OLD:    %tmp.98 = rem int %tmp.5.i24, 16                ; <int> [#uses=1]
NEW:    %tmp.98 = rem uint %tmp.5.i24, 16               ; <uint> [#uses=0]
OLD:    %tmp.91 = rem int %tmp.5.i19, 8         ; <int> [#uses=1]
NEW:    %tmp.91 = rem uint %tmp.5.i19, 8                ; <uint> [#uses=0]
OLD:    %tmp.88 = rem int %tmp.5.i14, 8         ; <int> [#uses=1]
NEW:    %tmp.88 = rem uint %tmp.5.i14, 8                ; <uint> [#uses=0]
OLD:    %tmp.85 = rem int %tmp.5.i9, 1024               ; <int> [#uses=2]
NEW:    %tmp.85 = rem uint %tmp.5.i9, 1024              ; <uint> [#uses=0]
OLD:    %tmp.82 = rem int %tmp.5.i, 512         ; <int> [#uses=2]
NEW:    %tmp.82 = rem uint %tmp.5.i1, 512               ; <uint> [#uses=0]
OLD:    %tmp.48.i = rem int %tmp.5.i.i161, 4            ; <int> [#uses=1]
NEW:    %tmp.48.i = rem uint %tmp.5.i.i161, 4           ; <uint> [#uses=0]
OLD:    %tmp.20.i2 = rem int %tmp.5.i.i, 4              ; <int> [#uses=1]
NEW:    %tmp.20.i2 = rem uint %tmp.5.i.i, 4             ; <uint> [#uses=0]

it also occurs 9 times in gcc, but with odd constant divisors (1009 and 61)
so the payoff isn't as great.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24189 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-05 07:28:37 +00:00
..
ADCE.cpp Make sure that anything using the ADCE pass pulls in the UnifyFunctionExitNodes 2005-10-24 01:40:23 +00:00
BasicBlockPlacement.cpp
CondPropagate.cpp
ConstantProp.cpp
CorrelatedExprs.cpp
DCE.cpp
DeadStoreElimination.cpp
GCSE.cpp
IndVarSimplify.cpp
InstructionCombining.cpp Turn srem -> urem when neither input has their sign bit set. This triggers 2005-11-05 07:28:37 +00:00
LICM.cpp
LoopStrengthReduce.cpp My previous patch was too conservative. Reject FP and void types, but do 2005-10-21 05:45:41 +00:00
LoopUnroll.cpp
LoopUnswitch.cpp
LowerGC.cpp When a function takes a variable number of pointer arguments, with a zero 2005-10-23 04:37:20 +00:00
LowerPacked.cpp
Makefile DONT_BUILD_RELINKED is gone and implied by BUILD_ARCHIVE now 2005-10-24 02:26:13 +00:00
PRE.cpp
Reassociate.cpp
ScalarReplAggregates.cpp
SCCP.cpp Eliminate GetGEPGlobalInitializer in favor of the more powerful 2005-09-26 05:28:52 +00:00
SimplifyCFG.cpp
TailDuplication.cpp
TailRecursionElimination.cpp