[PATCH] D79197: [SVE] Fix invalid usage of getNumElements() in InstCombineMulDivRem
Christopher Tetreault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 4 06:22:28 PDT 2020
ctetreau marked an inline comment as done.
ctetreau added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp:847-849
Constant *C1 = getLogBase2(Op0->getType(), cast<Constant>(Op1));
if (!C1)
llvm_unreachable("Failed to constant fold udiv -> logbase2");
----------------
fpetrogalli wrote:
> Wouldn't your changes get to LLVM unreachable here? Would it make sense to have a test that checks that `X udiv Y` don't crash the compiler when both X and Y are scalable vector and Y is a splat of a power of 2?
>
Test case added. It looks like the fixed width version gets here but the scalable version does not enter this function.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79197/new/
https://reviews.llvm.org/D79197
More information about the llvm-commits
mailing list