From f0e50a8374a398e52b224dff2aa88384f90424ff Mon Sep 17 00:00:00 2001 From: Willem Date: Thu, 9 Oct 2014 07:50:26 -0700 Subject: Fixed test/Concrete/ConstantExpr.ll The difference between a 64bit pointer truncated to 32 bits and the original 64bit pointer would never be 0 if any of the high 32bits in the pointer were test. If lli and klee had a different value for the top 32bits of the address this test would be marked as failing. Due to the 64bit printing buf in _testingUtils this was not exposed before. The fix clears the top 32bits of the difference. --- test/Concrete/ConstantExpr.ll | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/Concrete') diff --git a/test/Concrete/ConstantExpr.ll b/test/Concrete/ConstantExpr.ll index 3a151a0f..351223e7 100644 --- a/test/Concrete/ConstantExpr.ll +++ b/test/Concrete/ConstantExpr.ll @@ -24,8 +24,8 @@ define void @"test_int_to_ptr"() { define void @"test_constant_ops"() { %t1 = add i8 trunc(i64 add(i64 ptrtoint(i32* @gInt to i64), i64 -10) to i8), 10 - %t2 = sub i64 sext(i32 ptrtoint(i32* @gInt to i32) to i64), ptrtoint(i32* @gInt to i64) - %t3 = sub i64 zext(i32 ptrtoint(i32* @gInt to i32) to i64), ptrtoint(i32* @gInt to i64) + %t2 = and i64 sub(i64 sext(i32 ptrtoint(i32* @gInt to i32) to i64), i64 ptrtoint(i32* @gInt to i64)), 4294967295 + %t3 = and i64 sub(i64 zext(i32 ptrtoint(i32* @gInt to i32) to i64), i64 ptrtoint(i32* @gInt to i64)), 4294967295 %t4 = icmp eq i8 trunc(i64 ptrtoint(i32* @gInt to i64) to i8), %t1 %t5 = zext i1 %t4 to i8 -- cgit 1.4.1