Skip to content

missed fold, zext(x + 1) - 1 > C => x > C #86061

Open
@zhengyang92

Description

@zhengyang92

https://alive2.llvm.org/ce/z/-mgzSg
https://godbolt.org/z/xWreoG6x5

define i1 @src(i32 %0) {
entry:
  %2 = add i32 %0, 1
  %3 = zext i32 %2 to i64
  %4 = add i64 %3, -1
  %5 = icmp ult i64 %4, 8
  ret i1 %5
}

define i1 @tgt(i32 %0) {
entry:
  %r = icmp ult i32 %0, 8
  ret i1 %r
}

@regehr @dtcxzyw

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions