[PATCH] D39101: [RISCV 11.5/n] Codegen support for materializing constants

Simon Dardis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 19 10:54:34 PDT 2017


sdardis added inline comments.


================
Comment at: lib/Target/RISCV/RISCVInstrInfo.td:281
+def : Pat<(simm12:$imm), (ADDI X0, simm12:$imm)>;
+def : Pat<(simm32:$imm), (ADDI (LUI (HI20 imm:$imm)), (LO12Sext imm:$imm))>;
+
----------------
You should add the LUI pattern for materializing constants where the lower 12 bits are all zeros,


https://reviews.llvm.org/D39101





More information about the llvm-commits mailing list