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.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
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.Files:
lib/Analysis/ScalarEvolution.cpp test/Analysis/ScalarEvolution/min-max-exprs.llEMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits