diff --git a/.gitignore b/.gitignore --- a/.gitignore +++ b/.gitignore @@ -68,3 +68,42 @@ /clang/utils/analyzer/projects/*/RefScanBuildResults # automodapi puts generated documentation files here. /lldb/docs/python_api/ +*.xcbuild +*.a +*.o +*.dia +*.d +*.dat +llvm/xcode/build/XCBuildData/* +llvm/xcode/include/llvm/IR/LLVM.build/Debug/intrinsics_gen.build/Script-00566DF9EE997D9D0A1E1319.sh +*.pbxproj +*.LinkFileList +*.sh +*.pbxproj +*.plist +*.xcsettings +llvm/xcode/LLVM.xcodeproj/project.xcworkspace/xcuserdata/dalemartin.xcuserdatad/UserInterfaceState.xcuserstate +llvm/xcode/LLVM.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +llvm/xcode/LLVM.xcodeproj/project.pbxproj +llvm/xcode/include/llvm/Support/VCSRevision.h +llvm/xcode/include/llvm/IR/IntrinsicsXCore.h +llvm/xcode/include/llvm/IR/IntrinsicsX86.h +llvm/xcode/include/llvm/IR/IntrinsicsWebAssembly.h +llvm/xcode/include/llvm/IR/IntrinsicsVE.h +llvm/xcode/include/llvm/IR/IntrinsicsS390.h +llvm/xcode/include/llvm/IR/IntrinsicsRISCV.h +llvm/xcode/include/llvm/IR/IntrinsicsR600.h +llvm/xcode/include/llvm/IR/IntrinsicsPowerPC.h +llvm/xcode/include/llvm/IR/IntrinsicsNVPTX.h +llvm/xcode/include/llvm/IR/IntrinsicsMips.h +llvm/xcode/include/llvm/IR/IntrinsicsHexagon.h +llvm/xcode/include/llvm/IR/IntrinsicsBPF.h +llvm/xcode/include/llvm/IR/IntrinsicsARM.h +llvm/xcode/include/llvm/IR/IntrinsicsAMDGPU.h +llvm/xcode/include/llvm/IR/IntrinsicsAArch64.h +llvm/xcode/include/llvm/IR/IntrinsicImpl.inc +llvm/xcode/include/llvm/IR/IntrinsicEnums.inc +llvm/xcode/include/llvm/IR/Attributes.inc +llvm/xcode/Debug/bin/verify-uselistorder +llvm/xcode/Debug/bin/llvm-tblgen +llvm/xcode/LLVM.xcodeproj/.* diff --git a/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp b/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp --- a/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp @@ -54,6 +54,9 @@ for (auto &U : ValuePair.first->uses()) { auto *I = cast(U.getUser()); + // If we already have seen aƒZThe copy, reject the second one. + if (TheCopy) return false; + if (auto *LI = dyn_cast(I)) { // Ignore non-volatile loads, they are always ok. if (!LI->isSimple()) return false; @@ -72,6 +75,10 @@ continue; } + // If the pointer has been offset from the start of the alloca, we can't + // safely handle this. + if (IsOffset) return false; + if (auto *Call = dyn_cast(I)) { // If this is the function being called then we treat it like a load and // ignore it. @@ -118,13 +125,6 @@ continue; } - // If we already have seen a copy, reject the second one. - if (TheCopy) return false; - - // If the pointer has been offset from the start of the alloca, we can't - // safely handle this. - if (IsOffset) return false; - // If the memintrinsic isn't using the alloca as the dest, reject it. if (U.getOperandNo() != 0) return false;