[JumpThreading] Don't limit the type of an operand
authorJuneyoung Lee <aqjune@gmail.com>
Thu, 30 Jul 2020 14:46:26 +0000 (23:46 +0900)
committerJuneyoung Lee <aqjune@gmail.com>
Tue, 4 Aug 2020 07:21:58 +0000 (16:21 +0900)
commit6f97103b561cb14e26aafa3b90ecec97f1d08944
tree80b22fd8f9a4c63d131157798a27cf189015ba2f
parent689096965d9af1b00cd90f117c57fd9e7d07a479
[JumpThreading] Don't limit the type of an operand

Compared to the optimized code with branch conditions never frozen,
limiting the type of freeze's operand causes generation of suboptimal code in
some cases.
I would like to suggest removing the constraint, as this patch does.
If the number of freeze instructions becomes significant, this can be revisited.

Differential Revision: https://reviews.llvm.org/D84949
llvm/lib/Transforms/Scalar/JumpThreading.cpp
llvm/test/Transforms/JumpThreading/freeze.ll