[X86] getBT - attempt to peek through aext(and(trunc(x),c)) mask/modulo
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 28 Apr 2022 15:01:33 +0000 (16:01 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 28 Apr 2022 15:10:26 +0000 (16:10 +0100)
commitde7cee24b6fe97cc11225b20853ea97532a1c2e9
tree43328925247dd9b91a56d416ba9344e6d2e5b9c3
parent39dd29736ffa8e027400a2655861ca36929004a6
[X86] getBT - attempt to peek through aext(and(trunc(x),c)) mask/modulo

Ideally we'd fold this with generic DAGCombiner, but that only works for !isTruncateFree cases - we might be able to adapt IsDesirableToPromoteOp to find truncated src ops in the future, but for now just use this peephole.

Noticed in Issue #55138
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/setcc.ll