[PATCH] D93617: [DemandedBits] Add a whitelist when computing demanded bits of Trunc Instruction

guopeilin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 23 05:19:57 PST 2020


guopeilin added a comment.

In D93617#2469876 <https://reviews.llvm.org/D93617#2469876>, @lebedev.ri wrote:

> Can you please start with filing a bugreport, explaining the miscompile(?), with tests?

Yes, And I have take the `avoid-truncate-icmp-operands.ll` as an example to explain how the bug was generated.
The bug in https://bugs.llvm.org/show_bug.cgi?id=48583 is that when we want to `361804 >> 18` in a loop, 
after loop vectorization, we first truncate `361804` from 32-bits into 16-bits and then `lshr 18`, which produce a wrong answer


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93617/new/

https://reviews.llvm.org/D93617



More information about the llvm-commits mailing list