[SystemZ] Fix RNSBG bug introduced by r197802

The zext handling added in r197802 wasn't right for RNSBG.  This patch
restricts it to ROSBG, RXSBG and RISBG.  (The tests for RISBG were added
in r197802 since RISBG was the motivating example.)

llvm-svn: 198862
diff --git a/llvm/test/CodeGen/SystemZ/rosbg-01.ll b/llvm/test/CodeGen/SystemZ/rosbg-01.ll
index 0abaccc..96ee870 100644
--- a/llvm/test/CodeGen/SystemZ/rosbg-01.ll
+++ b/llvm/test/CodeGen/SystemZ/rosbg-01.ll
@@ -108,3 +108,14 @@
   %or = or i64 %a, %andb
   ret i64 %or
 }
+
+; Check the handling of zext and OR, which can use ROSBG.
+define i64 @f12(i64 %a, i32 %b) {
+; CHECK-LABEL: f12:
+; CHECK: rosbg %r2, %r3, 32, 63, 0
+; CHECK: br %r14
+  %add = add i32 %b, 1
+  %ext = zext i32 %add to i64
+  %or = or i64 %a, %ext
+  ret i64 %or
+}