Skip to content

[InstructionSimplify] InstructionSimplify error deleted phi #68683

Closed
@dianqk

Description

@dianqk

I tried this IR:

define i32 @src(i1 %c0, i1 %c1, i32 %v1) {
start:
  br i1 %c0, label %bb0, label %bb1

bb0:
  br label %bb1

bb1:
  %x = phi i32 [ %v1, %bb0 ], [ undef, %start ]
  br i1 %c1, label %bb0, label %bb2

bb2:
  ret i32 %x
}

phi should not be deleted by InstructionSimplify.

alive2: https://alive2.llvm.org/ce/z/LNXeGp

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions