[llvm-commits] [llvm] r43692 - in /llvm/trunk: lib/CodeGen/LiveIntervalAnalysis.cpp test/CodeGen/X86/2007-11-04-LiveIntervalCrash.ll
Evan Cheng
evan.cheng at apple.com
Sun Nov 4 16:59:10 PST 2007
Author: evancheng
Date: Sun Nov 4 18:59:10 2007
New Revision: 43692
URL: http://llvm.org/viewvc/llvm-project?rev=43692&view=rev
Log:
Fix PR1187.
Added:
llvm/trunk/test/CodeGen/X86/2007-11-04-LiveIntervalCrash.ll
Modified:
llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
Modified: llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp?rev=43692&r1=43691&r2=43692&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Sun Nov 4 18:59:10 2007
@@ -466,7 +466,7 @@
continue;
if (MRegisterInfo::isVirtualRegister(PhysReg))
PhysReg = vrm.getPhys(PhysReg);
- if (mri_->regsOverlap(PhysReg, reg))
+ if (PhysReg && mri_->regsOverlap(PhysReg, reg))
return true;
}
}
Added: llvm/trunk/test/CodeGen/X86/2007-11-04-LiveIntervalCrash.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2007-11-04-LiveIntervalCrash.ll?rev=43692&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/X86/2007-11-04-LiveIntervalCrash.ll (added)
+++ llvm/trunk/test/CodeGen/X86/2007-11-04-LiveIntervalCrash.ll Sun Nov 4 18:59:10 2007
@@ -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(...)
More information about the llvm-commits
mailing list