[DAG] computeKnownBits - add basic shift-by-parts handling
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 23 Jul 2022 08:46:30 +0000 (09:46 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 23 Jul 2022 08:46:30 +0000 (09:46 +0100)
commit8937252465a5f6575a7e3b353d5a095fc4bb90f2
treec48acd21173fb9e6cb682250c83875a60ff8ca14
parent380a1b204c36cc8c6fdf28618d8a838aed8b7197
[DAG] computeKnownBits - add basic shift-by-parts handling

Concat KnownBits from ISD::SHL_PARTS / ISD::SRA_PARTS / ISD::SRL_PARTS lo/hi operands and perform the KnownBits calculation by the shift amount on the extended type, before splitting the KnownBits based on the requested lo/hi result.
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
llvm/test/CodeGen/X86/shift-parts.ll