[PATCH] D120233: [SelectOpti][5/5] Optimize select-to-branch transformation
David Li via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 10 12:09:17 PDT 2022
davidxl added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectOptimize.cpp:398
+ // ILP with a naive ordering here.
+ SmallVector<Instruction *, 2> TrueSlicesInterleaved, FalseSlicesInterleaved;
+ for (unsigned long IS = 0; IS < maxTrueSliceLen; ++IS) {
----------------
Is it better to assert that TrueSlices and FalseSlices are not *both* empty? If that is that case, the transformation may be hurtful.
================
Comment at: llvm/test/CodeGen/X86/select-optimize.ll:152
; sink load
define i32 @expensive_val_operand1(i32* nocapture %a, i32 %y, i1 %cmp) {
; CHECK-LABEL: @expensive_val_operand1(
----------------
It is better to add a test case showing sinking for SI group with more than one selects.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120233/new/
https://reviews.llvm.org/D120233
More information about the llvm-commits
mailing list