[PATCH] D149365: [SimplifyCFG] Improve the way hoisting skips over non-matching instructions

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 27 11:37:29 PDT 2023


efriedma added inline comments.


================
Comment at: llvm/test/Transforms/SimplifyCFG/hoist-common-skip.ll:394
 ; CHECK-NEXT:    [[SS:%.*]] = call ptr @llvm.stacksave()
+; CHECK-NEXT:    [[I2:%.*]] = alloca inalloca i64, align 8
 ; CHECK-NEXT:    br i1 [[COND:%.*]], label [[BB1:%.*]], label [[BB2:%.*]]
----------------
foad wrote:
> This looks wrong since this alloca was hoisted past a stacksave. D133730 was supposed to prevent this, according to its description, but in fact it only seems to prevent the converse: hoisting a stacksave past an alloca. @aeubanks 
Forbidding hoisting allocas past side-effects seems appropriate, yes.  Should be straightforward.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D149365/new/

https://reviews.llvm.org/D149365



More information about the llvm-commits mailing list