[PATCH] D127871: [RISCV] Optimize 2x SELECT for floating-point types
Liao Chunyu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 8 00:20:30 PDT 2022
liaolucy added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:9855
+ auto Next = next_nodbg(MI.getIterator(), BB->instr_end());
+ if (MI.getOpcode() != RISCV::Select_GPR_Using_CC_GPR && Next != BB->end() &&
+ Next->getOpcode() == MI.getOpcode() &&
----------------
craig.topper wrote:
> I think we also need to make sure the condition for the second select doesn't use the output from the first select.
I'm still confused. You mean, should I need to add: Next->getOperand(4).getReg() != MI.getOperand(0).getReg() ?
But, the assembly of the bug.ll file has not changed.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127871/new/
https://reviews.llvm.org/D127871
More information about the llvm-commits
mailing list