summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/byval2.ll
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-04-12 04:36:06 +0000
committerDan Gohman <gohman@apple.com>2008-04-12 04:36:06 +0000
commit544ab2c50ba1acb803e57519ebf7ec81c3340f79 (patch)
tree53c0609d21cde14b6d7c7bd5e809f3b3a4060d25 /llvm/test/CodeGen/X86/byval2.ll
parent8c7cf88f7ea574d5c3831e0c50655e5ab60af85d (diff)
downloadbcm5719-llvm-544ab2c50ba1acb803e57519ebf7ec81c3340f79.tar.gz
bcm5719-llvm-544ab2c50ba1acb803e57519ebf7ec81c3340f79.zip
Drop ISD::MEMSET, ISD::MEMMOVE, and ISD::MEMCPY, which are not Legal
on any current target and aren't optimized in DAGCombiner. Instead of using intermediate nodes, expand the operations, choosing between simple loads/stores, target-specific code, and library calls, immediately. Previously, the code to emit optimized code for these operations was only used at initial SelectionDAG construction time; now it is used at all times. This fixes some cases where rep;movs was being used for small copies where simple loads/stores would be better. This also cleans up code that checks for alignments less than 4; let the targets make that decision instead of doing it in target-independent code. This allows x86 to use rep;movs in low-alignment cases. Also, this fixes a bug that resulted in the use of rep;stos for memsets of 0 with non-constant memory size when the alignment was at least 4. It's better to use the library in this case, which can be significantly faster when the size is large. This also preserves more SourceValue information when memory intrinsics are lowered into simple loads/stores. llvm-svn: 49572
Diffstat (limited to 'llvm/test/CodeGen/X86/byval2.ll')
-rw-r--r--llvm/test/CodeGen/X86/byval2.ll4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/test/CodeGen/X86/byval2.ll b/llvm/test/CodeGen/X86/byval2.ll
index f438160bdaa..f85c8ffbe4f 100644
--- a/llvm/test/CodeGen/X86/byval2.ll
+++ b/llvm/test/CodeGen/X86/byval2.ll
@@ -1,7 +1,9 @@
; RUN: llvm-as < %s | llc -march=x86-64 | grep rep.movsq | count 2
; RUN: llvm-as < %s | llc -march=x86 | grep rep.movsl | count 2
-%struct.s = type { i64, i64, i64 }
+%struct.s = type { i64, i64, i64, i64, i64, i64, i64, i64,
+ i64, i64, i64, i64, i64, i64, i64, i64,
+ i64 }
define void @g(i64 %a, i64 %b, i64 %c) {
entry:
OpenPOWER on IntegriCloud