https://llvm.org/bugs/show_bug.cgi?id=28892
Bug ID: 28892 Summary: AVX512: fmsub intrinsic generates fmadd instruction Product: libraries Version: trunk Hardware: PC OS: All Status: NEW Severity: normal Priority: P Component: Backend: X86 Assignee: unassignedb...@nondot.org Reporter: wenzel.ja...@epfl.ch CC: llvm-bugs@lists.llvm.org Classification: Unclassified Consider the following simple snippet which uses the fused multiply subtract instruction on AVX512 and AVX: ============= #include <immintrin.h> __m512 test(__m512 a, __m512 b, __m512 c) { return _mm512_fmsub_ps(a, b, c); } __m256 test(__m256 a, __m256 b, __m256 c) { return _mm256_fmsub_ps(a, b, c); } ============= In the AVX512 case, LLVM trunk generates the following weird code which does a sign flip first followed by a FMADD instruction. The AVX backend, in comparison, generates the expected (single FMADD instruction). __Z4testDv16_fS_S_: vpxord LCPI0_0(%rip), %zmm2, %zmm2 vfmadd213ps %zmm2, %zmm1, %zmm0 retq __Z4testDv8_fS_S_: vfmsub213ps %ymm2, %ymm1, %ymm0 retq -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs