[PATCH] D133999: [SelectOpti] Restrict load sinking

Sotiris Apostolakis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 15 21:34:16 PDT 2022


apostolakis added inline comments.


================
Comment at: llvm/test/CodeGen/X86/select-optimize.ll:247
+entry:
+  %load = load i32, ptr %a, align 8
+  br label %bb1
----------------
davidxl wrote:
> why is this unsafe to sink?
it is not unsafe to sink this load but the current version of the transformation does not check for sink-safety if such loads from other basic blocks and thus they should not be sunk. 
See patch description for why cross-basic-block load moves were avoided, even though there might be cases such as this one where sinking would have been safe.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133999



More information about the llvm-commits mailing list