hanchenye-llvm-project/llvm
Hal Finkel 851b33a0b1 [PowerPC] Load two floats directly instead of using one 64-bit integer load
When dealing with complex<float>, and similar structures with two
single-precision floating-point numbers, especially when such things are being
passed around by value, we'll sometimes end up loading both float values by
extracting them from one 64-bit integer load. It looks like this:

  t13: i64,ch = load<LD8[%ref.tmp]> t0, t6, undef:i64
      t16: i64 = srl t13, Constant:i32<32>
    t17: i32 = truncate t16
  t18: f32 = bitcast t17
    t19: i32 = truncate t13
  t20: f32 = bitcast t19

The problem, especially before the P8 where those bitcasts aren't legal (and
get expanded via the stack), is that it would have been better to use two
floating-point loads directly. Here we add a target-specific DAGCombine to do
just that. In short, we turn:

	ld 3, 0(5)
	stw 3, -8(1)
	rldicl 3, 3, 32, 32
	stw 3, -4(1)
	lfs 3, -4(1)
	lfs 0, -8(1)

into:

        lfs 3, 4(5)
        lfs 0, 0(5)

llvm-svn: 264988
2016-03-31 02:56:05 +00:00
..
bindings bindings/go: reinstate TargetMachine.TargetData 2016-03-15 05:04:06 +00:00
cmake [cmake] Instead of testing char16_t for MSVC compat, directly ask cl.exe its version 2016-03-30 18:19:39 +00:00
docs Introduce a @llvm.experimental.guard intrinsic 2016-03-31 00:18:46 +00:00
examples [Kaleidoscope] Rename Error -> LogError in Chapters 2-5. 2016-03-25 17:41:26 +00:00
include Introduce a @llvm.experimental.guard intrinsic 2016-03-31 00:18:46 +00:00
lib [PowerPC] Load two floats directly instead of using one 64-bit integer load 2016-03-31 02:56:05 +00:00
projects
resources
test [PowerPC] Load two floats directly instead of using one 64-bit integer load 2016-03-31 02:56:05 +00:00
tools Silencing warnings from MSVC 2015 Update 2. All of these changes silence "C4334 '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)". NFC. 2016-03-30 21:30:00 +00:00
unittests Cloning: Reduce complexity of debug info cloning and fix correctness issue. 2016-03-30 22:05:13 +00:00
utils Submitted new file with wrong line endings. Correcting... 2016-03-28 19:06:17 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitignore
CMakeLists.txt dos2unix CMakeLists.txt 2016-03-28 18:19:32 +00:00
CODE_OWNERS.TXT [lanai] Add Lanai backend. 2016-03-28 13:09:54 +00:00
CREDITS.TXT
LICENSE.TXT Update copyright year to 2016. 2016-03-30 22:41:06 +00:00
LLVMBuild.txt
README.txt
configure
llvm.spec.in

README.txt

Low Level Virtual Machine (LLVM)
================================

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.