llvm-project/llvm
Roman Lebedev ebed96fdbf
[InstCombine] Negator: `extractelement` is negatible if src is negatible
----------------------------------------
define i4 @negate_extractelement(<2 x i4> %x, i32 %y, i4 %z) {
%0:
  %t0 = sub <2 x i4> { 0, 0 }, %x
  call void @use_v2i4(<2 x i4> %t0)
  %t1 = extractelement <2 x i4> %t0, i32 %y
  %t2 = sub i4 %z, %t1
  ret i4 %t2
}
=>
define i4 @negate_extractelement(<2 x i4> %x, i32 %y, i4 %z) {
%0:
  %t0 = sub <2 x i4> { 0, 0 }, %x
  call void @use_v2i4(<2 x i4> %t0)
  %t1.neg = extractelement <2 x i4> %x, i32 %y
  %t2 = add i4 %t1.neg, %z
  ret i4 %t2
}
Transformation seems to be correct!
2020-05-20 21:44:31 +03:00
..
benchmarks
bindings Fix go bindings after FixedVectorType -> VectorType change. 2020-05-15 16:37:57 -07:00
cmake [CMake][AIX] Add `-bcdtors:mbr` option when building with IBM XL 2020-05-15 17:34:00 -04:00
docs [llvm][docs] Add step by step git to GettingStarted 2020-05-19 12:14:17 -07:00
examples StoreInst should store Align, not MaybeAlign 2020-05-15 12:26:58 -07:00
include Reland [X86] Codegen for preallocated 2020-05-20 11:25:44 -07:00
lib [InstCombine] Negator: `extractelement` is negatible if src is negatible 2020-05-20 21:44:31 +03:00
projects
resources
runtimes
test [InstCombine] Negator: `extractelement` is negatible if src is negatible 2020-05-20 21:44:31 +03:00
tools [gold-plugin] Unbreak the build after d9b9ce6c04 2020-05-20 11:56:06 +02:00
unittests [SCEV] Move ScalarEvolutionExpander.cpp to Transforms/Utils (NFC). 2020-05-20 10:53:40 +01:00
utils [gn build] Port bcbd26bfe6 2020-05-20 09:58:47 +00:00
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt [AIX] Make sure we use export lists for plugins 2020-05-08 14:00:25 -04:00
CODE_OWNERS.TXT
CREDITS.TXT
LICENSE.TXT
LLVMBuild.txt
README.txt
RELEASE_TESTERS.TXT
configure
llvm.spec.in

README.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.