mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 12:12:47 +01:00
699d18eb82
Fix assert about using an undefined physical register in machine instruction verify pass. The reason is that register flag undef is missing when doing transformation from If Conversion Pass. ``` Bad machine code: Using an undefined physical register - function: func_65 - basic block: %bb.0 entry (0x10024740738) - instruction: BCLR killed $cr5lt, implicit $lr8, implicit $rm, implicit undef $x3 - operand 0: killed $cr5lt LLVM ERROR: Found 1 machine code errors. ``` There are also other existing testcases with same issue. So I add -verify-machineinstrs option to open verifying. Differential Revision: https://reviews.llvm.org/D55408 llvm-svn: 348566
24 lines
655 B
LLVM
24 lines
655 B
LLVM
; RUN: llc -mcpu=pwr7 < %s -verify-machineinstrs | FileCheck %s
|
|
target datalayout = "E-m:e-i64:64-n32:64"
|
|
target triple = "powerpc64-unknown-linux-gnu"
|
|
|
|
; Function Attrs: nounwind
|
|
define void @Compute_Lateral() #0 {
|
|
entry:
|
|
br i1 undef, label %if.then, label %if.end
|
|
|
|
if.then: ; preds = %entry
|
|
unreachable
|
|
|
|
if.end: ; preds = %entry
|
|
%0 = select i1 undef, <2 x double> undef, <2 x double> zeroinitializer
|
|
%1 = extractelement <2 x double> %0, i32 1
|
|
store double %1, double* undef, align 8
|
|
ret void
|
|
|
|
; CHECK-LABEL: @Compute_Lateral
|
|
}
|
|
|
|
attributes #0 = { nounwind }
|
|
|