Displaying 2 results from an estimated 2 matches for "rem_i32".
Did you mean:
rel_32
2007 Jun 19
0
[LLVMdev] DAGCombiner: (S|U)REM
...without native div/rem instructions.
when compiling expressions like (a % 3), the dagcombiner turns them into
(a-(a/3)*3) which is not simplified later on. this is quite expensive
since the multiply is not pipelined and the div requires a libcall while
the same could have been achieved with a (S|U)REM_I32 libcall.
the problem is that the involved "magic" int TargetLowering has certain
requirements such as MULHU support, which is not available on my
architecture. i guess the best way is to check this conditions beforehand
in the DAGCombiner, right?
cheers,
-
dietmar
2007 Jun 19
2
[LLVMdev] DAGCombiner: (S|U)REM
On Mon, 18 Jun 2007, Chris Lattner wrote:
> On Thu, 14 Jun 2007, Dietmar Ebner wrote:
>> currently, the DAGCombiner unconditionally converts
>> (DAGCombiner::visit(U|S)REM) expressions of the form X % C for constants
>> C into X-X/C*C. this makes sense in certain cases where the div/mul
>> logic will simplify X/C*X but is counterproductive in general,
>>