mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user