Skip to content

[ValueTracking] icmp X, C1 implies (and X, C2) != C3 #118108

@dtcxzyw

Description

@dtcxzyw

https://alive2.llvm.org/ce/z/YjUHm-

define i1 @src(i64 %x) {
entry:
  %cond = icmp ugt i64 %x, 65535
  call void @llvm.assume(i1 %cond)
  %mask = and i64 %x, -65521
  %cmp = icmp eq i64 %mask, 0
  ret i1 %cmp
}

define i1 @tgt(i64 %x) {
entry:
  ret i1 false
}

See also dtcxzyw/llvm-tools#33.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions