[SCEV] Match 'zext (trunc A to iB) to iY' as URem.
authorFlorian Hahn <flo@fhahn.com>
Thu, 29 Oct 2020 09:30:37 +0000 (09:30 +0000)
committerFlorian Hahn <flo@fhahn.com>
Thu, 29 Oct 2020 10:46:52 +0000 (10:46 +0000)
commit88d6421e4c439582ca4ca5e3744f8cc4498bb48e
treeaf6fa688e2ae3220d9f9182ad10527931941b020
parent79c5b4c546bb528bd51003a10f0a5aecab74ffbe
[SCEV] Match 'zext (trunc A to iB) to iY' as URem.

URem operations with constant power-of-2 second operands are modeled as
such. This patch on its own has very little impact (e.g. no changes in
CodeGen for MultiSource/SPEC2000/SPEC2006 on X86 -O3 -flto), but I'll
soon post follow-up patches that make use of it to more accurately
determine the trip multiple.

Reviewed By: mkazantsev

Differential Revision: https://reviews.llvm.org/D89821
llvm/lib/Analysis/ScalarEvolution.cpp
llvm/unittests/Analysis/ScalarEvolutionTest.cpp