summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/Mips/GlobalISel/llvm-ir/dyn_stackalloc.ll
diff options
context:
space:
mode:
authorPetar Avramovic <Petar.Avramovic@rt-rk.com>2019-11-15 11:36:13 +0100
committerPetar Avramovic <Petar.Avramovic@rt-rk.com>2019-11-15 11:36:13 +0100
commitdda8e9554071164c85ac7b8b14bc5349703deaab (patch)
tree02c0e3edb3a8e28a5bef678b13e0d35456071373 /llvm/test/CodeGen/Mips/GlobalISel/llvm-ir/dyn_stackalloc.ll
parent1587c7e86f1c58e3f692f0a418e5df6aeb754bb0 (diff)
downloadbcm5719-llvm-dda8e9554071164c85ac7b8b14bc5349703deaab.tar.gz
bcm5719-llvm-dda8e9554071164c85ac7b8b14bc5349703deaab.zip
[MIPS GlobalISel] Select addiu
Introduce IntImmLeaf version of PatLeaf immSExt16 for 32-bit immediates. Change immSExt16 with imm32SExt16 for addiu. This keeps same behavior for SDAG and allows for GlobalISel selectImpl to select 'G_CONSTANT imm' + G_ADD into ADDIu when 32-bit imm satisfies imm32SExt16 predicate: sign extending 16 low bits of imm is equal to imm. Differential Revision: https://reviews.llvm.org/D70184
Diffstat (limited to 'llvm/test/CodeGen/Mips/GlobalISel/llvm-ir/dyn_stackalloc.ll')
-rw-r--r--llvm/test/CodeGen/Mips/GlobalISel/llvm-ir/dyn_stackalloc.ll5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/test/CodeGen/Mips/GlobalISel/llvm-ir/dyn_stackalloc.ll b/llvm/test/CodeGen/Mips/GlobalISel/llvm-ir/dyn_stackalloc.ll
index 5708de834c0..fcc2d6ef0a9 100644
--- a/llvm/test/CodeGen/Mips/GlobalISel/llvm-ir/dyn_stackalloc.ll
+++ b/llvm/test/CodeGen/Mips/GlobalISel/llvm-ir/dyn_stackalloc.ll
@@ -17,10 +17,9 @@ define void @Print_c_N_times(i8 %c, i32 %N) {
; MIPS32-NEXT: .cfi_def_cfa_register 30
; MIPS32-NEXT: ori $1, $zero, 1
; MIPS32-NEXT: ori $2, $zero, 0
-; MIPS32-NEXT: addu $3, $5, $1
+; MIPS32-NEXT: addiu $3, $5, 1
; MIPS32-NEXT: mul $1, $3, $1
-; MIPS32-NEXT: ori $3, $zero, 7
-; MIPS32-NEXT: addu $1, $1, $3
+; MIPS32-NEXT: addiu $1, $1, 7
; MIPS32-NEXT: addiu $3, $zero, 65528
; MIPS32-NEXT: and $1, $1, $3
; MIPS32-NEXT: move $3, $sp
OpenPOWER on IntegriCloud