Displaying 4 results from an estimated 4 matches for "visitshiftbyconst".
2016 Dec 08
2
visitShiftByConstant of DAGCombiner
Hi,
I recently worked on doing constant canonicalisation in DAGCombine level to
make as more folding as possible.
And I found the behavior of "visitShiftByConstant" is same with what I have
done, just only it only be enabled under
a shift context. But I think maybe we could expand it to as more case as
possible.
The original issuse of it:
For code as below:
unsigned array[4];
unsigned foo(unsigned long x) {
return array[(x>>2)&...
2016 Dec 19
0
visitShiftByConstant of DAGCombiner
On 19 December 2016 at 09:58, Jojo Ma <jojo.ma at linaro.org> wrote:
> /home/likewise-open/SPREADTRUM/jojo.ma/jojoma/source/llvm/llvm-linaro/llvm/llvm/test/CodeGen/Thumb2/machine-licm.ll:88:10:
> error: expected string not found in input
> ; CHECK: movw {{(r[0-9])|(lr)}}, #32768
> ^
> <stdin>:56:2: note: scanning from here
> movw r12, #32768
> ^
Hi
2016 Dec 19
2
visitShiftByConstant of DAGCombiner
Thanks very much, Renato!
I looked into the regressions, there're many cases have similar context as
the case I mentioned but N just has only one use.
In this case, the canonicalisation won't make it more profitable, will only
prevent the possible folding or
make the sequence is not expected.
The regressions be eliminated, after I limit the expanding to not
"N->hasOneUse()".
2016 Dec 15
0
visitShiftByConstant of DAGCombiner
On 8 December 2016 at 02:34, Jojo Ma <jojo.ma at linaro.org> wrote:
> It would be profitable as well if we could enable the canonicalisation on
> it.
> sequence before this canonicalisation (ARM):
> test:
> .fnstart
> @ BB#0: @ %entry
> movw r1, #65534
> and r1, r0, r1
> ubfx r0, r0, #1, #15
> add r0, r0, r1, lsr #1
> bx lr