Index: llvm/test/CodeGen/RISCV/shlimm-addimm.ll =================================================================== --- /dev/null +++ llvm/test/CodeGen/RISCV/shlimm-addimm.ll @@ -0,0 +1,408 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py + +; RUN: llc -mtriple=riscv32 -verify-machineinstrs < %s \ +; RUN: | FileCheck -check-prefix=RV32I %s +; RUN: llc -mtriple=riscv64 -verify-machineinstrs < %s \ +; RUN: | FileCheck -check-prefix=RV64I %s + +;; Test that (add (shl x, c0), c1) can be transformed to +;; (add (shl (add x, c1>>c0), c0), c1-(c1>>c0<