From eb68f1c661e4699013017a42d7ec785841d8805f Mon Sep 17 00:00:00 2001 From: Anton Korobeynikov Date: Thu, 16 Jul 2009 13:57:52 +0000 Subject: [PATCH] Completel forgot about unconditional branches git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75961 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/SystemZ/SystemZInstrInfo.td | 3 +++ test/CodeGen/SystemZ/07-BrUnCond.ll | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 test/CodeGen/SystemZ/07-BrUnCond.ll diff --git a/lib/Target/SystemZ/SystemZInstrInfo.td b/lib/Target/SystemZ/SystemZInstrInfo.td index c6169b316d0..34152fe32b3 100644 --- a/lib/Target/SystemZ/SystemZInstrInfo.td +++ b/lib/Target/SystemZ/SystemZInstrInfo.td @@ -271,6 +271,9 @@ let isReturn = 1, isTerminator = 1, isBarrier = 1, hasCtrlDep = 1 in { } let isBranch = 1, isTerminator = 1 in { + let isBarrier = 1 in + def JMP : Pseudo<(outs), (ins brtarget:$dst), "j\t{$dst}", [(br bb:$dst)]>; + let Uses = [PSW] in { def JE : Pseudo<(outs), (ins brtarget:$dst), "je\t$dst", diff --git a/test/CodeGen/SystemZ/07-BrUnCond.ll b/test/CodeGen/SystemZ/07-BrUnCond.ll new file mode 100644 index 00000000000..8ca6ed1a261 --- /dev/null +++ b/test/CodeGen/SystemZ/07-BrUnCond.ll @@ -0,0 +1,18 @@ +; RUN: llvm-as < %s | llc + +target datalayout = "E-p:64:64:64-i1:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128" +target triple = "s390x-linux" + +define void @foo() noreturn nounwind { +entry: + tail call void @baz() nounwind + br label %l1 + +l1: ; preds = %entry, %l1 + tail call void @bar() nounwind + br label %l1 +} + +declare void @bar() + +declare void @baz()