Skip to content

[InstCombine] samesign flag should be dropped #112350

@dtcxzyw

Description

@dtcxzyw

Reproducer:

define i1 @src(i64 %x, i64 %y, i1 %cond) {
  %cmp1 = icmp ult i64 %x, %y
  %cmp2 = icmp samesign uge i64 %x, %y
  %sel = select i1 %cond, i1 %cmp1, i1 %cmp2
  ret i1 %sel
}

define i1 @tgt(i64 %x, i64 %y, i1 %cond) {
  %cmp2 = icmp samesign uge i64 %x, %y
  %sel = xor i1 %cond, %cmp2
  ret i1 %sel
}

Metadata

Metadata

Assignees

Labels

llvm:analysisIncludes value tracking, cost tables and constant foldingmiscompilation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions