[PATCH] D149844: [X86] Add lowering of fminimum/fmaximum for vector operands
Evgenii Kudriashov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 8 08:57:49 PDT 2023
e-kud added inline comments.
================
Comment at: llvm/test/CodeGen/X86/fminimum-fmaximum.ll:1082
; X86-NEXT: retl
%r = call <2 x double> @llvm.minimum.v2f64(<2 x double> %x, <2 x double> <double 0., double 0.>)
ret <2 x double> %r
----------------
Shouldn't it be a simple `min(<0, 0>, x)`? `%x` is picked anyway as a second op, regardless `NaN` is there or `-0.0`
================
Comment at: llvm/test/CodeGen/X86/fminimum-fmaximum.ll:1086
+define <2 x double> @test_fminimum_vector_singned_zero(<2 x double> %x) {
+; SSE2-LABEL: test_fminimum_vector_singned_zero:
----------------
s/singned/signed
================
Comment at: llvm/test/CodeGen/X86/fminimum-fmaximum.ll:1167
; X86-NEXT: retl
%r = call <4 x float> @llvm.maximum.v4f32(<4 x float> %x, <4 x float> <float -0., float -0., float -0., float -0.>)
ret <4 x float> %r
----------------
Same but with max: `max(<-0, -0, -0, -0>, x)` should return the right answer without any checks.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149844/new/
https://reviews.llvm.org/D149844
More information about the llvm-commits
mailing list