[PATCH] Allow ScalarEvolution to catch more min/max cases
Nick Lewycky
nicholas at mxc.ca
Wed Feb 4 01:01:13 PST 2015
The logic here looks pretty obviously correct. I am confused about the
whitespace though. This looks right:
+ if (getTypeSizeInBits(LHS->getType()) <=
+ getTypeSizeInBits(U->getType())) {
but these do not:
+ if (getTypeSizeInBits(LHS->getType()) <=
+ getTypeSizeInBits(U->getType()) &&
...
+ if (getTypeSizeInBits(LHS->getType()) <=
+ getTypeSizeInBits(U->getType()) &&
Consider clang-format'ing and then commit.
Johannes Doerfert wrote:
> Hi sunfish, atrick, bkramer,
>
> For the test case attached different types are used in the ICmpInst
> and SelectInst that represent the min/max expressions. However, if the
> ICmpInst type is smaller a comparison with the sign/zero extended
> operands would have yielded the same result. This situation might arise after
> the instruction combination pass was applied.
>
> http://reviews.llvm.org/D7338
>
> Files:
> lib/Analysis/ScalarEvolution.cpp
> test/Analysis/ScalarEvolution/min-max-exprs.ll
>
> EMAIL PREFERENCES
> http://reviews.llvm.org/settings/panel/emailpreferences/
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list