[PATCH] D29937: [RISCV 15/n] Implement lowering of ISD::SELECT_CC

Alex Bradbury via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 25 06:20:28 PDT 2017


asb updated this revision to Diff 112687.
asb marked 5 inline comments as done.
asb added a comment.

Hi Philip, many many thanks for the review - this code has been copied around several backends, and we can certainly do better (patches for those backends to follow!). This is exactly the sort of thing I'm trying to avoid with this backend project, so I really appreciate you calling it this case where the code fell short. The code comment was incorrect to say a diamond control flow pattern is being inserted, as it's actually just a triangle. Hopefully the Head/IfFalse/Tail names make more sense. I've made normaliseSetCC a separate helper function in addition to your suggested CondCode->BranchOpcode helper (this felt sensible, given getBranchOpcodeForIntCondCode expects its argument has been normalised in this way).


https://reviews.llvm.org/D29937

Files:
  lib/Target/RISCV/RISCVISelLowering.cpp
  lib/Target/RISCV/RISCVISelLowering.h
  lib/Target/RISCV/RISCVInstrInfo.td
  test/CodeGen/RISCV/select-cc.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29937.112687.patch
Type: text/x-patch
Size: 9948 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170825/590df87b/attachment.bin>


More information about the llvm-commits mailing list