Index: llvm/trunk/lib/Transforms/IPO/SampleProfile.cpp =================================================================== --- llvm/trunk/lib/Transforms/IPO/SampleProfile.cpp +++ llvm/trunk/lib/Transforms/IPO/SampleProfile.cpp @@ -544,10 +544,10 @@ if (!FS) return std::error_code(); - // Ignore all intrinsics and branch instructions. - // Branch instruction usually contains debug info from sources outside of + // Ignore all intrinsics, phinodes and branch instructions. + // Branch and phinodes instruction usually contains debug info from sources outside of // the residing basic block, thus we ignore them during annotation. - if (isa(Inst) || isa(Inst)) + if (isa(Inst) || isa(Inst) || isa(Inst)) return std::error_code(); // If a direct call/invoke instruction is inlined in profile