From facf45a82f66df27ab2d9874c3cc80556ea66857 Mon Sep 17 00:00:00 2001 From: Sanjay Patel Date: Wed, 27 Apr 2016 23:14:12 +0000 Subject: [SimplifyCFG] propagate branch metadata when creating select There's no existing test for this path, and I don't know how to expose it in a regression test, but I'm assuming there's some reason this path exists. llvm-svn: 267813 --- llvm/lib/Transforms/Utils/SimplifyCFG.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/Transforms/Utils') diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp index 01f7c81b7d3..6ac039d8a1a 100644 --- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp @@ -2024,8 +2024,8 @@ static bool SimplifyCondBranchToTwoReturns(BranchInst *BI, } else if (isa(TrueValue)) { TrueValue = FalseValue; } else { - TrueValue = Builder.CreateSelect(BrCond, TrueValue, - FalseValue, "retval"); + TrueValue = + Builder.CreateSelect(BrCond, TrueValue, FalseValue, "retval", BI); } } -- cgit v1.2.3