R600/SI: add cummuting of rev instructions
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 178127
diff --git a/llvm/test/CodeGen/R600/lshl.ll b/llvm/test/CodeGen/R600/lshl.ll
index 328451c..423adb9 100644
--- a/llvm/test/CodeGen/R600/lshl.ll
+++ b/llvm/test/CodeGen/R600/lshl.ll
@@ -1,6 +1,6 @@
;RUN: llc < %s -march=r600 -mcpu=SI | FileCheck %s
-;CHECK: V_LSHL_B32_e64 VGPR0, VGPR0, 1, 0, 0, 0, 0
+;CHECK: V_LSHLREV_B32_e32 VGPR0, 1, VGPR0
define void @test(i32 %p) {
%i = mul i32 %p, 2
diff --git a/llvm/test/CodeGen/R600/lshr.ll b/llvm/test/CodeGen/R600/lshr.ll
index 0d3f524..551eac1 100644
--- a/llvm/test/CodeGen/R600/lshr.ll
+++ b/llvm/test/CodeGen/R600/lshr.ll
@@ -1,6 +1,6 @@
;RUN: llc < %s -march=r600 -mcpu=SI | FileCheck %s
-;CHECK: V_LSHR_B32_e64 VGPR0, VGPR0, 1, 0, 0, 0, 0
+;CHECK: V_LSHRREV_B32_e32 VGPR0, 1, VGPR0
define void @test(i32 %p) {
%i = udiv i32 %p, 2
diff --git a/llvm/test/CodeGen/R600/mulhu.ll b/llvm/test/CodeGen/R600/mulhu.ll
index 979074d..28744e0 100644
--- a/llvm/test/CodeGen/R600/mulhu.ll
+++ b/llvm/test/CodeGen/R600/mulhu.ll
@@ -2,7 +2,7 @@
;CHECK: V_MOV_B32_e32 VGPR1, -1431655765
;CHECK-NEXT: V_MUL_HI_U32 VGPR0, VGPR0, VGPR1, 0, 0, 0, 0, 0
-;CHECK-NEXT: V_LSHR_B32_e64 VGPR0, VGPR0, 1, 0, 0, 0, 0
+;CHECK-NEXT: V_LSHRREV_B32_e32 VGPR0, 1, VGPR0
define void @test(i32 %p) {
%i = udiv i32 %p, 3