diff options
author | Bob Wilson <bob.wilson@apple.com> | 2012-08-03 21:26:18 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2012-08-03 21:26:18 +0000 |
commit | 772af92cb16a5e11bd580f576643a6268e8a5bce (patch) | |
tree | 1203a6feff2d18cf8952074c01ec6c7ca63c97f3 /test/CodeGen/X86/memcmp.ll | |
parent | b2beac2b9671f7d9773329d62c2821c8ac449ac5 (diff) |
Fix memcmp code-gen to honor -fno-builtin.
I noticed that SelectionDAGBuilder::visitCall was missing a check for memcmp
in TargetLibraryInfo, so that it would use custom code for memcmp calls even
with -fno-builtin. I also had to add a new -disable-simplify-libcalls option
to llc so that I could write a test for this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161262 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/memcmp.ll')
-rw-r--r-- | test/CodeGen/X86/memcmp.ll | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/CodeGen/X86/memcmp.ll b/test/CodeGen/X86/memcmp.ll index f4bc1bb701..723d1d8942 100644 --- a/test/CodeGen/X86/memcmp.ll +++ b/test/CodeGen/X86/memcmp.ll @@ -1,4 +1,5 @@ ; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s +; RUN: llc < %s -disable-simplify-libcalls -mtriple=x86_64-linux | FileCheck %s --check-prefix=NOBUILTIN ; RUN: llc < %s -mtriple=x86_64-win32 | FileCheck %s ; This tests codegen time inlining/optimization of memcmp @@ -23,6 +24,8 @@ return: ; preds = %entry ; CHECK: memcmp2: ; CHECK: movw ([[A0:%rdi|%rcx]]), %ax ; CHECK: cmpw ([[A1:%rsi|%rdx]]), %ax +; NOBUILTIN: memcmp2: +; NOBUILTIN: callq } define void @memcmp2a(i8* %X, i32* nocapture %P) nounwind { |