From db5c1f3d7616cb469374903acdac032469749699 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Thu, 9 Jan 2014 11:28:53 +0000 Subject: [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.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198862 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/SystemZ/rnsbg-01.ll | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test/CodeGen/SystemZ/rnsbg-01.ll') diff --git a/test/CodeGen/SystemZ/rnsbg-01.ll b/test/CodeGen/SystemZ/rnsbg-01.ll index 666aeb21e8..282810a781 100644 --- a/test/CodeGen/SystemZ/rnsbg-01.ll +++ b/test/CodeGen/SystemZ/rnsbg-01.ll @@ -255,3 +255,14 @@ define i64 @f22(i64 %a, i64 %b) { %and = and i64 %a, %rotlorb ret i64 %and } + +; Check the handling of zext and AND, which isn't suitable for RNSBG. +define i64 @f23(i64 %a, i32 %b) { +; CHECK-LABEL: f23: +; CHECK-NOT: rnsbg +; CHECK: br %r14 + %add = add i32 %b, 1 + %ext = zext i32 %add to i64 + %and = and i64 %a, %ext + ret i64 %and +} -- cgit v1.2.3