[llvm-dev] Question about demanded bits analysis

Raul Garcia via llvm-dev llvm-dev at lists.llvm.org
Thu May 18 08:04:42 PDT 2017


Hello All,


I am trying to understand the demanded-bits pass. The example in the source code (below) seems quite explicit. In the example, only 16 bits from a 32 bit variable in IR are demanded and therefore the variable is truncated to a 16 bit variable.


%1 = add i32 %x, %y
%2 = trunc i32 %1 to i16

However I was wondering if  for example, the addition demanded, say 18 bits, would this pass generate a i18 integer variable? I have not done the experiment, but I would like to know beforehand if this is something that this pass can do.


Regards,
Raul.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170518/dd99c196/attachment.html>


More information about the llvm-dev mailing list