Skip to content

Commit 4ef3fbe

Browse files
committed
Builbot Failure fix:
1. Using 64-bit virtual register instead of 32-bit in SystemZISelLowering.cpp for -mbackchain option. -verify-machineinstrs option exposed it. 2. Adding -verify-machineinstrs option to run llvm tests. 3. Using %clang_cc1 instead of %clang for clang test failure. 4. Fix issue with unused variable being used in assert().
1 parent caf16d6 commit 4ef3fbe

File tree

6 files changed

+12
-2
lines changed

6 files changed

+12
-2
lines changed

clang/test/CodeGen/SystemZ/builtin-setjmp-logjmp.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5
2-
// RUN: %clang --target=s390x-linux -S -emit-llvm -o - %s | FileCheck %s
2+
// RUN: %clang_cc1 -triple s390x-linux -emit-llvm -o - %s | FileCheck %s
33

44
void *buf[20];
5+
56
// CHECK-LABEL: define dso_local void @foo(
67
// CHECK-SAME: ) #[[ATTR0:[0-9]+]] {
78
// CHECK-NEXT: [[ENTRY:.*:]]

llvm/lib/Target/SystemZ/SystemZISelLowering.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -961,6 +961,7 @@ SystemZTargetLowering::emitEHSjLjSetJmp(MachineInstr &MI,
961961
Register DstReg = MI.getOperand(0).getReg();
962962
const TargetRegisterClass *RC = MRI.getRegClass(DstReg);
963963
assert(TRI->isTypeLegalForClass(*RC, MVT::i32) && "Invalid destination!");
964+
(void)TRI;
964965
Register mainDstReg = MRI.createVirtualRegister(RC);
965966
Register restoreDstReg = MRI.createVirtualRegister(RC);
966967

@@ -1059,7 +1060,7 @@ SystemZTargetLowering::emitEHSjLjSetJmp(MachineInstr &MI,
10591060
// Slot 3(Offset = 2) Backchain value (if building with -mbackchain).
10601061
bool BackChain = MF->getSubtarget<SystemZSubtarget>().hasBackChain();
10611062
if (BackChain) {
1062-
Register BCReg = MRI.createVirtualRegister(RC);
1063+
Register BCReg = MRI.createVirtualRegister(PtrRC);
10631064
auto *TFL = Subtarget.getFrameLowering<SystemZFrameLowering>();
10641065
MIB = BuildMI(*thisMBB, MI, DL, TII->get(SystemZ::LG), BCReg)
10651066
.addReg(SpecialRegs->getStackPointerRegister())

llvm/test/CodeGen/SystemZ/builtin-longjmp.ll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
; Stack Pointer from Slot 4.
77
; Literal Pool Pointer from Slot 5.
88

9+
; RUN: llc < %s -verify-machineinstrs -mtriple=s390x-linux-gnu | FileCheck %s
10+
911
; RUN: llc < %s -mtriple=s390x-linux-gnu -O2 | FileCheck %s
1012

1113
@buf = global [20 x ptr] zeroinitializer, align 8

llvm/test/CodeGen/SystemZ/builtin-setjmp-alloca.ll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
; Stack Pointer in slot 4.
88
; Clobber %r6-%r15, %f8-%f15.
99

10+
; RUN: llc < %s -verify-machineinstrs -mtriple=s390x-linux-gnu | FileCheck %s
11+
1012
; RUN: llc < %s -mtriple=s390x-linux-gnu -O2 | FileCheck %s
1113

1214
declare i32 @llvm.eh.sjlj.setjmp(ptr)

llvm/test/CodeGen/SystemZ/builtin-setjmp-spills.ll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
; Stack Pointer in slot 4.
88
; Clobber %r6-%r15, %f8-%f15.
99

10+
; RUN: llc < %s -verify-machineinstrs -mtriple=s390x-linux-gnu | FileCheck %s
11+
1012
; RUN: llc < %s -mtriple=s390x-linux-gnu -O3 | FileCheck %s
1113

1214
declare i32 @llvm.eh.sjlj.setjmp(ptr)

llvm/test/CodeGen/SystemZ/builtin-setjmp.ll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
; Stack Pointer in slot 4.
66
; Clobber %r6-%r15, %f8-%f15.
77

8+
; RUN: llc < %s -verify-machineinstrs -mtriple=s390x-linux-gnu | FileCheck %s
9+
810
; RUN: llc < %s -mtriple=s390x-linux-gnu -O2 | FileCheck %s
911

1012
declare i32 @llvm.eh.sjlj.setjmp(ptr)

0 commit comments

Comments
 (0)