[llvm] [VPlan] Add initial CFG simplification, removing BranchOnCond true. (PR #106748)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 2 04:14:06 PDT 2025
================
@@ -54,14 +54,11 @@ define void @test_widen_exp_v2(ptr noalias %p2, ptr noalias %p, i64 %n) #5 {
;
; TFCOMMON-LABEL: @test_widen_exp_v2(
; TFCOMMON-NEXT: entry:
-; TFCOMMON-NEXT: [[TMP0:%.*]] = add i64 [[N:%.*]], 1
-; TFCOMMON-NEXT: [[N_RND_UP:%.*]] = add i64 [[TMP0]], 1
-; TFCOMMON-NEXT: [[N_MOD_VF:%.*]] = urem i64 [[N_RND_UP]], 2
-; TFCOMMON-NEXT: [[N_VEC:%.*]] = sub i64 [[N_RND_UP]], [[N_MOD_VF]]
-; TFCOMMON-NEXT: [[TMP1:%.*]] = sub i64 [[TMP0]], 2
-; TFCOMMON-NEXT: [[TMP2:%.*]] = icmp ugt i64 [[TMP0]], 2
+; TFCOMMON-NEXT: [[N_RND_UP:%.*]] = add i64 [[TMP0:%.*]], 1
----------------
fhahn wrote:
Yep unfortunately running extra passes can lead to some hard-to-understand changes, which is one of the main. reason this is discouraged :(
We are at least getting close to a point where we can perform most of the required simplifciations to clean up directly on the VPlans, before even generating code.
https://github.com/llvm/llvm-project/pull/106748
More information about the llvm-commits
mailing list