Skip to content

missed fold, x / c < x => x > 0 #85313

Closed
@zhengyang92

Description

@zhengyang92

https://alive2.llvm.org/ce/z/yG_wxp
https://godbolt.org/z/fKo893Pv1

define i1 @src(i32 %0, i1 %1, i1 %2, i1 %3, i8 %4) {
if.then160:
  %5 = sdiv i32 %0, 131313
  %6 = icmp slt i32 %5, %0
  ret i1 %6
}


define i1 @tgt(i32 %0, i1 %1, i1 %2, i1 %3, i8 %4) {
if.then160:
  %5 = icmp sgt i32 %0, 0
  ret i1 %5
}

Constant 131313 can be anything but 0 or 1.

@dtcxzyw @regehr

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions