1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
Go to file
Sebastian Pop 2a094bb4d1 fix fmls fp16
Tim Northover remarked that the added patterns for fmls fp16
produce wrong code in case the fsub instruction has a
multiplication as its first operand, i.e., all the patterns FMLSv*_OP1:

> define <8 x half> @test_FMLSv8f16_OP1(<8 x half> %a, <8 x half> %b, <8 x half> %c) {
> ; CHECK-LABEL: test_FMLSv8f16_OP1:
> ; CHECK: fmls {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
> entry:
>
>   %mul = fmul fast <8 x half> %c, %b
>   %sub = fsub fast <8 x half> %mul, %a
>   ret <8 x half> %sub
> }
>
> This doesn't look right to me. The exact instruction produced is "fmls
> v0.8h, v2.8h, v1.8h", which I think calculates "v0 - v2*v1", but the
> IR is calculating "v2*v1-v0". The equivalent <4 x float> code also
> doesn't emit an fmls.

This patch generates an fmla and negates the value of the operand2 of the fsub.

Inspecting the pattern match, I found that there was another mistake in the
opcode to be selected: matching FMULv4*16 should generate FMLSv4*16
and not FMLSv2*32.

Tested on aarch64-linux with make check-all.

Differential Revision: https://reviews.llvm.org/D67990

llvm-svn: 374044
2019-10-08 13:23:57 +00:00
benchmarks
bindings Revert "[OCaml] Handle nullptr in Llvm.global_initializer" 2019-10-01 08:29:07 +00:00
cmake Reland r349624: Let TableGen write output only if it changed, instead of doing so in cmake 2019-10-03 21:22:28 +00:00
docs Fix the spelling of my name. 2019-10-07 22:55:42 +00:00
examples [Orc] Roll back ThreadPool to std::function 2019-09-13 11:59:51 +00:00
include fix fmls fp16 2019-10-08 13:23:57 +00:00
lib fix fmls fp16 2019-10-08 13:23:57 +00:00
projects Add few docs and implementation of strcpy and strcat. 2019-10-04 17:30:54 +00:00
resources
runtimes Adding support for overriding LLVM_ENABLE_RUNTIMES for runtimes builds. 2019-09-24 22:38:18 +00:00
test fix fmls fp16 2019-10-08 13:23:57 +00:00
tools [llvm-exegesis] Finish plumbing the Config field. 2019-10-08 09:06:48 +00:00
unittests [SVE][IR] Scalable Vector size queries and IR instruction support 2019-10-08 12:53:54 +00:00
utils [LitConfig] Silenced notes/warnings on quiet. 2019-10-08 01:31:02 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitattributes Fix the "git modified" issue on the preserve-comments-crlf.s. 2019-09-10 12:17:49 +00:00
.gitignore
CMakeLists.txt Add few docs and implementation of strcpy and strcat. 2019-10-04 17:30:54 +00:00
CODE_OWNERS.TXT Update email address in CODE_OWNERS 2019-07-01 16:01:15 +00:00
configure
CREDITS.TXT Update email address. 2019-07-17 07:02:02 +00:00
LICENSE.TXT
llvm.spec.in
LLVMBuild.txt
README.txt Test commit. 2019-10-03 14:57:49 +00:00
RELEASE_TESTERS.TXT

The LLVM Compiler Infrastructure
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.