[PATCH] D54653: Correct CreateAlignmentAssumption to check sign and power-of-2 (LLVM Part)
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 26 00:24:30 PST 2018
lebedev.ri added inline comments.
================
Comment at: include/llvm/IR/IRBuilder.h:2201-2203
+ Value *IsPositive = CreateICmp(
+ Sign == AlignmentSign::Signed ? CmpInst::ICMP_SGT : CmpInst::ICMP_UGT,
+ Alignment, ConstantInt::get(Alignment->getType(), 0), "ispositive");
----------------
Would it be better to only keep the predicate change, and leave the power-of-two as UB?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D54653/new/
https://reviews.llvm.org/D54653
More information about the llvm-commits
mailing list