Issue 239067
Summary [LoongArch] missing optimization: vfrintrm.s + vftintrz.w.s => vftintrm.w.s
Labels new issue
Assignees
Reporter xry111
    ```llvm
declare <4 x float> @llvm.floor.v4f32(<4 x float>)

define <4 x i32> @t1(<4 x float> %a) nounwind {
  %1 = call <4 x float> @llvm.floor.v4f32(<4 x float> %a)
  %2 = fptosi <4 x float> %1 to <4 x i32>
  ret <4 x i32> %2
}
```

is compiled to:

```
t1:                                     # @t1
        vfrintrm.s $vr0, $vr0
        vftintrz.w.s    $vr0, $vr0
        ret
```

But it would be better to simply use vftintrm.w.s instead.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to