OSDN Git Service

[InstCombine] Add (vXi1 trunc(lshr(x,c))) -> icmp_eq(and(x,c')) support for non-unifo...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 2 Jul 2020 15:56:33 +0000 (16:56 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 2 Jul 2020 15:56:33 +0000 (16:56 +0100)
commit769b9799307485aff87c562a8bafff828b166e2b
tree0ad6bad68af78f51603d84e657d5295ab2ba4ab3
parent103d62e1313d80f4a9f4285ad1280b793dfd9f9b
[InstCombine] Add (vXi1 trunc(lshr(x,c))) -> icmp_eq(and(x,c')) support for non-uniform vectors

As noted on PR46531, we were only performing this transform on uniform vectors as we were using the m_APInt pattern matcher to extract the shift amount.

Differential Revision: https://reviews.llvm.org/D83035
llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
llvm/test/Transforms/InstCombine/apint-shift.ll
llvm/test/Transforms/InstCombine/icmp.ll