Issue 171759
Summary RISC-V: Missing combine fcmp/vselect optimize for OGE
Labels new issue
Assignees
Reporter wzssyqa
    ```
;  we can get fmin 
define <4 x float> @getsmaxf32(<4 x float> %a, <4 x float> %b) {
entry:
  %0 = fcmp nnan olt <4 x float> %a, %b
  %1 = select nnan <4 x i1> %0, <4 x float> %a, <4 x float> %b
  ret <4 x float> %1
}

;  we can get fmax 
define <4 x double> @getsmaxf64(<4 x double> %a, <4 x double> %b) {
entry:
  %0 = fcmp nnan oge <4 x double> %a, %b
  %1 = select nnan <4 x i1> %0, <4 x double> %a, <4 x double> %b
  ret <4 x double> %1
}
```

The problem is about `olt` vs `oge`.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to