[PATCH] D51000: [BypassSlowDivision] Teach bypass slow division not to interfere with div by constant where constants have been constant hoisted, but not moved from their basic block
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 20 15:20:00 PDT 2018
spatel added inline comments.
================
Comment at: lib/Transforms/Utils/BypassSlowDivision.cpp:200-203
// After Constant Hoisting pass, long constants may be represented as
// bitcast instructions. As a result, some constants may look like an
// instruction at first, and an additional check is necessary to find out if
// an operand is actually a constant.
----------------
Similar check - can we handle div opcodes here?
There's an IR version of peekThroughBitcast() in InstCombineInternal.h. Lift that to a higher header, so we can use it here too?
https://reviews.llvm.org/D51000
More information about the llvm-commits
mailing list