Skip to content

[LVI][CVP] CVP error deleted the abs function #68682

Closed
llvm/llvm-project-release-prs
#733
@dianqk

Description

@dianqk

I tried this IR:

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

bb0:
  %v1_i32 = zext i8 %v1 to i32
  br label %bb1

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

bb2:
  %z = call i32 @llvm.abs.i32(i32 %x, i1 false)
  ret i32 %z
}

abs should not be deleted by CVP.

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

Split issue from #68381.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions