diff options
author | Chris Lattner <sabre@nondot.org> | 2010-04-15 04:48:01 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-04-15 04:48:01 +0000 |
commit | 2392ae7d7344674dc3d946e324342515f4771b90 (patch) | |
tree | 2d8213997e4ea96040beda18dcf7cffe95789eee /lib/Target/README.txt | |
parent | ae541aad5c36cb3e4256514447d1f81e253079c7 (diff) | |
download | llvm-2392ae7d7344674dc3d946e324342515f4771b90.tar.gz llvm-2392ae7d7344674dc3d946e324342515f4771b90.tar.bz2 llvm-2392ae7d7344674dc3d946e324342515f4771b90.tar.xz |
Implement rdar://7860110 (also in target/readme.txt) narrowing
a load/or/and/store sequence into a narrower store when it is
safe. Daniel tells me that clang will start producing this sort
of thing with bitfields, and this does trigger a few dozen times
on 176.gcc produced by llvm-gcc even now.
This compiles code like CodeGen/X86/2009-05-28-DAGCombineCrash.ll
into:
movl %eax, 36(%rdi)
instead of:
movl $4294967295, %eax ## imm = 0xFFFFFFFF
andq 32(%rdi), %rax
shlq $32, %rcx
addq %rax, %rcx
movq %rcx, 32(%rdi)
and each of the testcases into a single store. Each of them used
to compile into craziness like this:
_test4:
movl $65535, %eax ## imm = 0xFFFF
andl (%rdi), %eax
shll $16, %esi
addl %eax, %esi
movl %esi, (%rdi)
ret
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101343 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/README.txt')
-rw-r--r-- | lib/Target/README.txt | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/lib/Target/README.txt b/lib/Target/README.txt index 052a5756da..150143bec7 100644 --- a/lib/Target/README.txt +++ b/lib/Target/README.txt @@ -263,19 +263,6 @@ if anyone cared enough about sincos. //===---------------------------------------------------------------------===// -Turn this into a single byte store with no load (the other 3 bytes are -unmodified): - -define void @test(i32* %P) { - %tmp = load i32* %P - %tmp14 = or i32 %tmp, 3305111552 - %tmp15 = and i32 %tmp14, 3321888767 - store i32 %tmp15, i32* %P - ret void -} - -//===---------------------------------------------------------------------===// - quantum_sigma_x in 462.libquantum contains the following loop: for(i=0; i<reg->size; i++) |