[PATCH] D34184: [InstCombine] Teach foldSelectICmpAndOr to recognize (select (icmp slt (trunc (X)), 0), Y, (or Y, C2))
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 22 06:25:15 PDT 2017
spatel accepted this revision.
spatel added a comment.
This revision is now accepted and ready to land.
LGTM. See inline for a nit.
================
Comment at: lib/Transforms/InstCombine/InstCombineSelect.cpp:384-388
+ // Insert the AND instruction on the input to the truncate.
+ V = Builder->CreateAnd(
+ V, ConstantInt::get(V->getType(),
+ APInt::getOneBitSet(
+ V->getType()->getScalarSizeInBits(), C1Log)));
----------------
That "line" still looks awful. :)
Give the OneBitSet variable a name and its own line(s), so clang-format can do better?
https://reviews.llvm.org/D34184
More information about the llvm-commits
mailing list