[PATCH] D137758: [HardwareLoops] remove loops which has undef count
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 10 03:55:24 PST 2022
fhahn added inline comments.
================
Comment at: llvm/lib/CodeGen/HardwareLoops.cpp:447
+ // dedicated exit block, so we just delete these loops.
+ if (isa<UndefValue>(Count)) {
+ LLVM_DEBUG(dbgs() << " - Bailing, loop count is undef\n");
----------------
I doubt this is enough. I think you would at least have to ensure that the branch on undef is executed unconditionally in the loop. Also, shouldn't those dead loops be cleaned up earlier?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137758/new/
https://reviews.llvm.org/D137758
More information about the llvm-commits
mailing list