[PATCH] D135847: [PowerPC] don't check CTR clobber in hardware loop insertion pass
ChenZheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 13 23:29:00 PST 2022
shchenz added inline comments.
================
Comment at: llvm/test/CodeGen/PowerPC/pr55463.ll:71
; CHECK-NEXT: evmergelo 3, 3, 4
-; CHECK-NEXT: addi 28, 28, 1
+; CHECK-NEXT: addi 28, 28, -1
; CHECK-NEXT: cmplwi 28, 0
----------------
shchenz wrote:
> lkail wrote:
> > nit: `undef` leads to flag flip.
> Can you be more specific? Do you mean we should not use `addi -1`? The `addi -1` is hard-coded. See https://github.com/llvm/llvm-project/blob/main/llvm/lib/Target/PowerPC/PPCCTRLoops.cpp#L263-L266 .
The loop count for this loop is `undef`, so ideally this loop can be totally optimized out, I tried to fix this in D137758, but the reviewer suggested this should not be an issue as long as opt is able to remove this loop.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135847/new/
https://reviews.llvm.org/D135847
More information about the llvm-commits
mailing list