Jonas Paulsson | a9bb00d | 2017-01-18 08:32:54 +0000 | [diff] [blame] | 1 | ; 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 Pilgrim | 4b51989 | 2017-01-18 11:40:28 +0000 | [diff] [blame] | 5 | ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 -verify-machineinstrs | FileCheck %s |
Jonas Paulsson | a9bb00d | 2017-01-18 08:32:54 +0000 | [diff] [blame] | 6 | |
| 7 | ; LLCRMux |
| 8 | define void @f1(i8*) { |
| 9 | ; CHECK-LABEL: f1: |
| 10 | ; CHECK-NOT: *** Bad machine code: Using an undefined physical register *** |
| 11 | BB: |
| 12 | %L5 = load i8, i8* %0 |
| 13 | %B9 = lshr i8 %L5, -1 |
| 14 | br label %CF |
| 15 | |
| 16 | CF: ; preds = %CF, %BB |
| 17 | %Cmp25 = icmp ne i8 27, %B9 |
| 18 | br i1 %Cmp25, label %CF, label %CF34 |
| 19 | |
| 20 | CF34: ; preds = %CF |
| 21 | ret void |
| 22 | } |