[llvm-dev] Why ISel Shifts operations can only be expanded for Value type vector ?
vivek pandya via llvm-dev
llvm-dev at lists.llvm.org
Fri Mar 3 09:21:11 PST 2017
Hello LLVM Devs,
I am working on a target on which no SHL instruction is available. So
wanted to expand it through MUL. But currently it is only possible to
expand SHL for vector types.
One possible reason I can think is because LLVM tries to optimize MUL to
SHL in certain cases and that can make compiler co in loop or may end up
generating wrong code.
But I think SHL should be able to expanded to MUL and to prevent looping
between MUL and SHL we can put a condition that only optimize MUL to SHL
when SHL is not expanded operation. The similar logic can be applied to DIV
and SRA.
If there is any other reasons for not doing this, kindly explain.
Sincerely,
Vivek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170303/6f0d0f16/attachment.html>
More information about the llvm-dev
mailing list