[PATCH] D112428: [DAG] Create fptoui.sat from clamped fptosi

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 25 12:51:54 PDT 2021


craig.topper added inline comments.


================
Comment at: llvm/test/CodeGen/RISCV/fpclamptosat.ll:187
+; RV32IF-NEXT:  # %bb.1: # %entry
+; RV32IF-NEXT:    slti a2, a1, 0
+; RV32IF-NEXT:    beqz a2, .LBB2_3
----------------
craig.topper wrote:
> Something weird is happening here. We should be able to fold the slti and beqz together. I'll investigate.
This an artifact of DAGTypeLegalizer::IntegerExpandSetCCOperands creating a select of setccs. So we end up with a select_cc as part of the condition of another select_cc. Both of the selects get expanded to control flow and tail duplication leaves us with the silly looking code.


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

https://reviews.llvm.org/D112428



More information about the llvm-commits mailing list