[PATCH] D149344: [SCEV] Replace IsAvailableOnEntry with block disposition

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 26 06:14:32 PDT 2023


nikic added a comment.

@uabelho Thanks for the report! Here's a reduced test case:

  ; RUN: opt -S -passes='print<scalar-evolution>,loop(loop-unroll-full)' < %s
  define i32 @test(ptr %arg) {
  entry:
    br label %loop
  
  loop:
    %iv = phi ptr [ %arg, %loop.latch ], [ null, %entry ]
    %load = load i32, ptr null, align 4
    br i1 false, label %loop.exit, label %loop.latch
  
  loop.latch:
    br i1 false, label %loop.exit, label %loop
  
  loop.exit:
    %exitval = phi i32 [ 0, %loop.latch ], [ %load, %loop ]
    ret i32 %exitval
  }

I expect the only relation this patch has to the issue is that we now calculate a disposition that we previously didn't, so it now gets verified.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149344



More information about the llvm-commits mailing list