[PATCH] D132910: [SimplifyCFG] add a test for branch folding multiple BB

Yaxun Liu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 17 14:55:40 PDT 2022


yaxunl marked 5 inline comments as done.
yaxunl added inline comments.


================
Comment at: llvm/test/Transforms/SimplifyCFG/branch-fold-multiple.ll:2
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt %s -S -o - -simplifycfg | FileCheck %s
+
----------------
fhahn wrote:
> please use the newpm syntax: `-passes=simplifycfg`
will do


================
Comment at: llvm/test/Transforms/SimplifyCFG/branch-fold-multiple.ll:10
+
+define zeroext i1 @test1(i32 %0, i32 %1, i32 %2, i32 %3) unnamed_addr align 2 {
+; CHECK-LABEL: @test1(
----------------
fhahn wrote:
> nit: drop unneeded `zero ext` `unnamed_addr align 2`
will do


================
Comment at: llvm/test/Transforms/SimplifyCFG/branch-fold-multiple.ll:56
+; Check the second, third, and forth basic blocks are folded into the first
+; basi block since each has no bonus instruction.
+
----------------
fhahn wrote:
> nit: `basi -> basic`
will do


================
Comment at: llvm/test/Transforms/SimplifyCFG/branch-fold-multiple.ll:97
+; since it has three bonus instructions, which exceeds the default bonus
+; instruction threshold 1. The third and fourth basic blocks are folded
+; into the second basic block since they do not have bonus instruction.
----------------
fhahn wrote:
> nit: of 1.
will do


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D132910/new/

https://reviews.llvm.org/D132910



More information about the llvm-commits mailing list