mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
Fix PR1187.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43692 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
18b0ca854f
commit
5f5f3b6333
@ -466,7 +466,7 @@ bool LiveIntervals::conflictsWithPhysRegDef(const LiveInterval &li,
|
||||
continue;
|
||||
if (MRegisterInfo::isVirtualRegister(PhysReg))
|
||||
PhysReg = vrm.getPhys(PhysReg);
|
||||
if (mri_->regsOverlap(PhysReg, reg))
|
||||
if (PhysReg && mri_->regsOverlap(PhysReg, reg))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
37
test/CodeGen/X86/2007-11-04-LiveIntervalCrash.ll
Normal file
37
test/CodeGen/X86/2007-11-04-LiveIntervalCrash.ll
Normal file
@ -0,0 +1,37 @@
|
||||
; RUN: llvm-as < %s | llc -mtriple=x86_64-unknown-linux-gnu
|
||||
; PR1187
|
||||
|
||||
%struct.dentry = type { %struct.dentry_operations* }
|
||||
%struct.dentry_operations = type { i32 (%struct.dentry*, %struct.qstr*)* }
|
||||
%struct.qstr = type { i32, i32, i8* }
|
||||
|
||||
define %struct.dentry* @d_hash_and_lookup(%struct.dentry* %dir, %struct.qstr* %name) {
|
||||
entry:
|
||||
br i1 false, label %bb37, label %bb
|
||||
|
||||
bb: ; preds = %bb, %entry
|
||||
%name8.0.reg2mem.0.rec = phi i64 [ %indvar.next, %bb ], [ 0, %entry ] ; <i64> [#uses=1]
|
||||
%hash.0.reg2mem.0 = phi i64 [ %tmp27, %bb ], [ 0, %entry ] ; <i64> [#uses=1]
|
||||
%tmp13 = load i8* null, align 1 ; <i8> [#uses=1]
|
||||
%tmp1314 = zext i8 %tmp13 to i64 ; <i64> [#uses=1]
|
||||
%tmp25 = lshr i64 %tmp1314, 4 ; <i64> [#uses=1]
|
||||
%tmp22 = add i64 %tmp25, %hash.0.reg2mem.0 ; <i64> [#uses=1]
|
||||
%tmp26 = add i64 %tmp22, 0 ; <i64> [#uses=1]
|
||||
%tmp27 = mul i64 %tmp26, 11 ; <i64> [#uses=2]
|
||||
%indvar.next = add i64 %name8.0.reg2mem.0.rec, 1 ; <i64> [#uses=2]
|
||||
%exitcond = icmp eq i64 %indvar.next, 0 ; <i1> [#uses=1]
|
||||
br i1 %exitcond, label %bb37.loopexit, label %bb
|
||||
|
||||
bb37.loopexit: ; preds = %bb
|
||||
%phitmp = trunc i64 %tmp27 to i32 ; <i32> [#uses=1]
|
||||
br label %bb37
|
||||
|
||||
bb37: ; preds = %bb37.loopexit, %entry
|
||||
%hash.0.reg2mem.1 = phi i32 [ %phitmp, %bb37.loopexit ], [ 0, %entry ] ; <i32> [#uses=1]
|
||||
store i32 %hash.0.reg2mem.1, i32* null, align 8
|
||||
%tmp75 = tail call i32 null( %struct.dentry* %dir, %struct.qstr* %name ) ; <i32> [#uses=0]
|
||||
%tmp84 = tail call i32 (...)* @d_lookup( %struct.dentry* %dir, %struct.qstr* %name ) ; <i32> [#uses=0]
|
||||
ret %struct.dentry* null
|
||||
}
|
||||
|
||||
declare i32 @d_lookup(...)
|
Loading…
Reference in New Issue
Block a user