[PATCH] D75780: [Attributor] Fold terminators before changing instructions to unreachable

Stefanos Baziotis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 6 16:34:17 PST 2020


baziotis added a comment.

Example:

  define internal i32 @callee(i1 %C, i32* %A) {
  entry:
    %A.0 = load i32, i32* null
    br i1 %C, label %T, label %F
  
  T:
    ret i32 %A.0
  
  F:
    ret i32 1
  }
  
  define i32 @foo() {
    %X = call i32 @callee(i1 false, i32* null)
    ret i32 %X
  }

I'll come back tomorrow to add it as a test.


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

https://reviews.llvm.org/D75780





More information about the llvm-commits mailing list