[LLVMdev] Does LLVM optimize rudimentary i16 -> i32 conversions

Dave Pitsbawn dpitsbawn at gmail.com
Fri Apr 17 21:00:14 PDT 2015


In my language there are a lot of i16 definitions, but almost all of the
time they are upgraded to i32 because my add operations only happen on i32.

So to be representative to my language definition, I have a lots of
Sext/Zext and Truncs pretty much every time I add or subtract.

As soon as I pass through InstCombine things look much nicer, all the
upcasts and downcasts go away, but my test cases are simple.

Is InstCombine pretty good about finding most/all such cases?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150417/04cee200/attachment.html>


More information about the llvm-dev mailing list