[PATCH] D30513: [NVPTX] Reduce amount of boilerplate code used to select load instruction opcode.

Justin Lebar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 1 15:07:02 PST 2017


jlebar added a comment.

As I've said before, red *is* my favorite color.  :)

> This patch also catches number of f16 load variants that were not handled before.

Do we want to add tests so we don't regress this?



================
Comment at: lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp:795
+// opcode selection.
+static unsigned pickLoadOpcodeForVT(MVT::SimpleValueType VT, unsigned Opcode_i8,
+                                    unsigned Opcode_i16, unsigned Opcode_i32,
----------------
Do we want to use optional<unsigned> here instead so you can't forget to check for the default case?


https://reviews.llvm.org/D30513





More information about the llvm-commits mailing list