summaryrefslogtreecommitdiff
path: root/test/CodeGen/exprs.c
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-05-27 18:47:56 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-05-27 18:47:56 +0000
commit5e20cdd81c44a443562a09007668ffdf76c455af (patch)
treedbbd4047878da71c1a706e26ce05b4e7791b14cc /test/CodeGen/exprs.c
parentd5f23b0b7528b5c3caed1ba14f897cc4aaa9e3c3 (diff)
Notes
Diffstat (limited to 'test/CodeGen/exprs.c')
-rw-r--r--test/CodeGen/exprs.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/test/CodeGen/exprs.c b/test/CodeGen/exprs.c
index 2a2216946b25..59afa802b183 100644
--- a/test/CodeGen/exprs.c
+++ b/test/CodeGen/exprs.c
@@ -127,9 +127,9 @@ int f11(long X) {
return A[X];
// CHECK: [[Xaddr:%[^ ]+]] = alloca i64, align 8
-// CHECK: load {{.*}}* [[Xaddr]]
-// CHECK-NEXT: getelementptr inbounds [100 x i32]* %A, i32 0,
-// CHECK-NEXT: load i32*
+// CHECK: load {{.*}}, {{.*}}* [[Xaddr]]
+// CHECK-NEXT: getelementptr inbounds [100 x i32], [100 x i32]* %A, i32 0,
+// CHECK-NEXT: load i32, i32*
}
int f12() {
@@ -184,3 +184,14 @@ void f17() {
extfunc(x);
// CHECK: add nsw i128 %{{.}}, -1
}
+
+// PR23597: We should evaluate union cast operands even if the cast is unused.
+typedef union u {
+ int i;
+} strct;
+int returns_int(void);
+void f18() {
+ (strct)returns_int();
+}
+// CHECK-LABEL: define void @f18()
+// CHECK: call i32 @returns_int()