Skip to content

missed fold, fcmp ogt (x - y), 0 => fcmp ogt x, y #85245

Closed
@zhengyang92

Description

@zhengyang92

https://alive2.llvm.org/ce/z/azHAHq
https://godbolt.org/z/M8WbdYE8x

define i1 @src(float %0, float %1) {
%t2 = fsub float %0, %1
%t3 = fcmp ogt float %t2, 0.000000e+00
ret i1 %t3
}

define i1 @tgt(float %0, float %1) {
%olt = fcmp ogt float %0, %1
ret i1 %olt
}

@jayfoad @regehr

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions