[llvm] r267813 - [SimplifyCFG] propagate branch metadata when creating select

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 27 16:14:12 PDT 2016


Author: spatel
Date: Wed Apr 27 18:14:12 2016
New Revision: 267813

URL: http://llvm.org/viewvc/llvm-project?rev=267813&view=rev
Log:
[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. 


Modified:
    llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp

Modified: llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp?rev=267813&r1=267812&r2=267813&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp Wed Apr 27 18:14:12 2016
@@ -2024,8 +2024,8 @@ static bool SimplifyCondBranchToTwoRetur
     } else if (isa<UndefValue>(TrueValue)) {
       TrueValue = FalseValue;
     } else {
-      TrueValue = Builder.CreateSelect(BrCond, TrueValue,
-                                       FalseValue, "retval");
+      TrueValue =
+          Builder.CreateSelect(BrCond, TrueValue, FalseValue, "retval", BI);
     }
   }
 




More information about the llvm-commits mailing list