[PATCH] Allow ScalarEvolution to catch more min/max cases
Nick Lewycky
nicholas at mxc.ca
Sun Feb 8 23:09:53 PST 2015
Johannes Doerfert wrote:
> Hey Nick,
>
> thanks for the review.
>
> On 02/04, Nick Lewycky wrote:
>> 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.
> I actually did (as I am used to format the whole file anyway). To be
> completely sure I checked again and my clang format produces this kind
> of indention. It is probably because of the continuation of the latter
> expressions, however it might as well be a glitch in the formatter.
>
> Should I change the indention or keep the one produced by clang format?
Huh. Keep what clang-format did. Thanks!
>
> Best regards,
> Johannes
>
>> 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