blob: 0e6d87ec960f1ee9da19d26d188cd3e664479f28 [file] [log] [blame]
Jonas Paulssona9bb00d2017-01-18 08:32:54 +00001; Test that the backend does not mess up the I/R in case of a use of an undef
2; register. This typically happens while expanding a pseudo or otherwise
3; replacing an instruction for another.
4;
Simon Pilgrim4b519892017-01-18 11:40:28 +00005; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 -verify-machineinstrs | FileCheck %s
Jonas Paulssona9bb00d2017-01-18 08:32:54 +00006
7; LLCRMux
8define void @f1(i8*) {
9; CHECK-LABEL: f1:
10; CHECK-NOT: *** Bad machine code: Using an undefined physical register ***
11BB:
12 %L5 = load i8, i8* %0
13 %B9 = lshr i8 %L5, -1
14 br label %CF
15
16CF: ; preds = %CF, %BB
17 %Cmp25 = icmp ne i8 27, %B9
18 br i1 %Cmp25, label %CF, label %CF34
19
20CF34: ; preds = %CF
21 ret void
22}