[PATCH] [clang] Update a test-case affected by IntToPtr/PtrToInt being folded into Loads

David Majnemer david.majnemer at gmail.com
Thu May 28 11:55:29 PDT 2015


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D9153

Files:
  cfe/trunk/test/CodeGen/mips-varargs.c

Index: cfe/trunk/test/CodeGen/mips-varargs.c
===================================================================
--- cfe/trunk/test/CodeGen/mips-varargs.c
+++ cfe/trunk/test/CodeGen/mips-varargs.c
@@ -111,14 +111,14 @@
 // ALL:   [[VA1:%.+]] = bitcast i8** %va to i8*
 // ALL:   call void @llvm.va_start(i8* [[VA1]])
 //
-// O32:   [[AP_CUR:%.+]] = load i8*, i8** %va, align [[PTRALIGN]]
+// O32:   [[TMP0:%.+]] = bitcast i8** %va to i32*
+// O32:   [[AP_CUR:%.+]] = load [[INTPTR_T:i32]], i32* [[TMP0]], align [[PTRALIGN]]
 // NEW:   [[TMP0:%.+]] = bitcast i8** %va to i64**
 // NEW:   [[AP_CUR:%.+]] = load i64*, i64** [[TMP0]], align [[PTRALIGN]]
 //
 // i64 is 8-byte aligned, while this is within O32's stack alignment there's no
 // guarantee that the offset is still 8-byte aligned after earlier reads.
-// O32:   [[PTR0:%.+]] = ptrtoint i8* [[AP_CUR]] to [[INTPTR_T:i32]]
-// O32:   [[PTR1:%.+]] = add i32 [[PTR0]], 7
+// O32:   [[PTR1:%.+]] = add i32 [[AP_CUR]], 7
 // O32:   [[PTR2:%.+]] = and i32 [[PTR1]], -8
 // O32:   [[PTR3:%.+]] = inttoptr [[INTPTR_T]] [[PTR2]] to i64*
 // O32:   [[PTR4:%.+]] = inttoptr [[INTPTR_T]] [[PTR2]] to i8*
@@ -200,11 +200,14 @@
 // ALL:   %va = alloca i8*, align [[PTRALIGN]]
 // ALL:   [[VA1:%.+]] = bitcast i8** %va to i8*
 // ALL:   call void @llvm.va_start(i8* [[VA1]])
-// ALL:   [[AP_CUR:%.+]] = load i8*, i8** %va, align [[PTRALIGN]]
 //
-// O32:   [[PTR0:%.+]] = ptrtoint i8* [[AP_CUR]] to [[INTPTR_T:i32]]
-// N32:   [[PTR0:%.+]] = ptrtoint i8* [[AP_CUR]] to [[INTPTR_T:i32]]
-// N64:   [[PTR0:%.+]] = ptrtoint i8* [[AP_CUR]] to [[INTPTR_T:i64]]
+// O32:   [[TMP0:%.+]] = bitcast i8** %va to i32*
+// N32:   [[TMP0:%.+]] = bitcast i8** %va to i32*
+// N64:   [[TMP0:%.+]] = bitcast i8** %va to i64*
+//
+// O32:   [[PTR0:%.+]] = load [[INTPTR_T:i32]], i32* [[TMP0]], align [[PTRALIGN]]
+// N32:   [[PTR0:%.+]] = load [[INTPTR_T:i32]], i32* [[TMP0]], align [[PTRALIGN]]
+// N64:   [[PTR0:%.+]] = load [[INTPTR_T:i64]], i64* [[TMP0]], align [[PTRALIGN]]
 //
 // Vectors are 16-byte aligned, however the O32 ABI has a maximum alignment of
 // 8-bytes since the base of the stack is 8-byte aligned.

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9153.26712.patch
Type: text/x-patch
Size: 2148 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150528/09513812/attachment.bin>


More information about the cfe-commits mailing list