Skip to content

Commit b1bda56

Browse files
committed
Address review comments
1 parent 5a5de39 commit b1bda56

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

llvm/lib/Transforms/Utils/SimplifyCFG.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1661,6 +1661,11 @@ static bool areIdenticalUpToCommutativity(const Instruction *I1,
16611661
/// \endcode
16621662
///
16631663
/// So we need to turn hoisted load/store into cload/cstore.
1664+
///
1665+
/// \param BI The branch instruction.
1666+
/// \param SpeculatedConditionalLoadsStores The load/store instructions that
1667+
/// will be speculated.
1668+
/// \param Invert indicates if speculates FalseBB. Only used in triangle CFG.
16641669
static void hoistConditionalLoadsStores(
16651670
BranchInst *BI,
16661671
SmallVectorImpl<Instruction *> &SpeculatedConditionalLoadsStores,

llvm/test/Transforms/SimplifyCFG/X86/hoist-loads-stores-with-cf.ll

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -757,8 +757,9 @@ if.true:
757757
ret i32 %res
758758
}
759759

760-
define i32 @multi_successors(i1 %c1, i32 %c2, ptr %p) {
761-
; CHECK-LABEL: @multi_successors(
760+
;; Not transform if either BB has multiple successors.
761+
define i32 @not_multi_successors(i1 %c1, i32 %c2, ptr %p) {
762+
; CHECK-LABEL: @not_multi_successors(
762763
; CHECK-NEXT: entry:
763764
; CHECK-NEXT: br i1 [[C1:%.*]], label [[ENTRY_IF:%.*]], label [[COMMON_RET:%.*]]
764765
; CHECK: entry.if:

0 commit comments

Comments
 (0)