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 | fa59485b94460784d990150c5e06c250195e480e (patch) | |
| tree | dea9db1320a6db3db79556953d05fbf321a9f619 /llvm/lib/CodeGen | |
| parent | 6430583017c0dd6185e0ca9682b4437d352a68df (diff) | |
| download | bcm5719-llvm-fa59485b94460784d990150c5e06c250195e480e.tar.gz bcm5719-llvm-fa59485b94460784d990150c5e06c250195e480e.zip | |
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.
llvm-svn: 161262
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index 2cdc41b078e..692c4376894 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -5682,7 +5682,7 @@ void SelectionDAGBuilder::visitCall(const CallInst &I) { Tmp.getValueType(), Tmp)); return; } - } else if (Name == "memcmp") { + } else if ((LibInfo->has(LibFunc::memcmp) && Name == "memcmp")) { if (visitMemCmpCall(I)) return; } |

