[PATCH] D46399: Skip blocks with no predecessors for CFIInstrInserter verify

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 3 11:23:55 PDT 2018


craig.topper added a comment.

This fix fixes the original case, but its easy to break it again

  target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
  target triple = "x86_64-unknown-linux-gnu"
  
  ; Function Attrs: noinline nounwind optnone uwtable
  define hidden void @foo() #0 {
  bb:
    br label %bb1
  
  bb1:                                              ; preds = %bb3, %bb
    %tmp = icmp ne i32 0, 0
    br i1 %tmp, label %bb2, label %bb3
  
  bb2:                                              ; preds = %bb1
    br label %bb4
  
  bb4:                                              ; preds = %bb2
    br label %bb3
  
  bb3:                                              ; preds = %bb4, %bb1
    br label %bb1
  }
  
  attributes #0 = { noinline nounwind optnone uwtable "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" }


Repository:
  rL LLVM

https://reviews.llvm.org/D46399





More information about the llvm-commits mailing list