[PATCH] D111532: [RISCV] Optimize immediate materialisation with BCLRI
    Craig Topper via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Oct 11 04:36:04 PDT 2021
    
    
  
craig.topper added inline comments.
================
Comment at: llvm/lib/Target/RISCV/MCTargetDesc/RISCVMatInt.cpp:191
+           "Expected RV32 to only need 2 instructions");
+    int64_t NewVal = Val + 0x80000000;
+    if (NewVal < 0 && isInt<32>(NewVal)) {
----------------
Can this be Val | 0x80000000? That makes more sense to me since BCLRI only affects 1 bit.
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111532/new/
https://reviews.llvm.org/D111532
    
    
More information about the llvm-commits
mailing list