summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2016-04-27 23:14:12 +0000
committerSanjay Patel <spatel@rotateright.com>2016-04-27 23:14:12 +0000
commitfacf45a82f66df27ab2d9874c3cc80556ea66857 (patch)
tree32ce1f466d8b9353b3c240410de642a6ee832c17
parentbd0ae2e14c93e4c59d4c6739f3dfdd48149e489d (diff)
downloadbcm5719-llvm-facf45a82f66df27ab2d9874c3cc80556ea66857.tar.gz
bcm5719-llvm-facf45a82f66df27ab2d9874c3cc80556ea66857.zip
[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
-rw-r--r--llvm/lib/Transforms/Utils/SimplifyCFG.cpp4
1 files changed, 2 insertions, 2 deletions
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<UndefValue>(TrueValue)) {
TrueValue = FalseValue;
} else {
- TrueValue = Builder.CreateSelect(BrCond, TrueValue,
- FalseValue, "retval");
+ TrueValue =
+ Builder.CreateSelect(BrCond, TrueValue, FalseValue, "retval", BI);
}
}
OpenPOWER on IntegriCloud