[PATCH] D46162: [PowerPC] Don't transform to CTR loop if the decrement branch instr. would end up in a different loop

Chandler Carruth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 26 17:24:57 PDT 2018


chandlerc added inline comments.


================
Comment at: test/CodeGen/PowerPC/no-ctr-loop-if-exit-in-nested-loop.ll:1-4
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc -mcpu=pwr8 -mtriple=powerpc64le-unknown-unknown \
+; RUN:   -verify-machineinstrs < %s | FileCheck %s
+define hidden fastcc void @gen_bitlen() {
----------------
I'm really worried that this test is overreduced.

I think you should craft an IR test that directly forms the pattern you describe where an outer loop has an exiting block shared with an inner loop, but the trip count can only be computed for the outer loop.

I'd also encourage you to not have any undef in the branches. Instead, you really just want to have a "real" (if minimal) loop structure.


Repository:
  rL LLVM

https://reviews.llvm.org/D46162





More information about the llvm-commits mailing list