summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/exprs.c
diff options
context:
space:
mode:
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 2a22169..59afa80 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()
OpenPOWER on IntegriCloud