summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/exprs.c
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-12-04 12:43:24 +0000
committerJohn McCall <rjmccall@apple.com>2010-12-04 12:43:24 +0000
commit594827281cbcd40a07637fdc7678bacccce30e0e (patch)
treed360c46ce7a54f63463b841ba19c3fe999b19989 /clang/test/CodeGen/exprs.c
parentca61b6567bab5b1d3e7210969d55e15d1177f5de (diff)
downloadbcm5719-llvm-594827281cbcd40a07637fdc7678bacccce30e0e.tar.gz
bcm5719-llvm-594827281cbcd40a07637fdc7678bacccce30e0e.zip
Silly special case: never load when dereferencing void*.
llvm-svn: 120905
Diffstat (limited to 'clang/test/CodeGen/exprs.c')
-rw-r--r--clang/test/CodeGen/exprs.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/clang/test/CodeGen/exprs.c b/clang/test/CodeGen/exprs.c
index 452c823d15f..b03539333cd 100644
--- a/clang/test/CodeGen/exprs.c
+++ b/clang/test/CodeGen/exprs.c
@@ -152,17 +152,17 @@ void f14(struct s14 *a) {
}
// CHECK: define void @f15
-void f15(void *v, const void *cv, volatile void *vv) {
- extern void f15_helper(void);
- f15_helper();
- // CHECK: call void @f15_helper()
- // FIXME: no loads from i8* should occur here at all!
- *v; *v, *v; v ? *v : *v;
- *cv; *cv, *cv; v ? *cv : *cv;
- *vv; *vv, *vv; vv ? *vv : *vv;
- // CHECK: volatile load i8*
- // CHECK: volatile load i8*
- // CHECK: volatile load i8*
- // CHECK-NOT: load i8* %
+void f15() {
+ extern void f15_start(void);
+ f15_start();
+ // CHECK: call void @f15_start()
+
+ extern void *f15_v(void);
+ extern const void *f15_cv(void);
+ extern volatile void *f15_vv(void);
+ *f15_v(); *f15_v(), *f15_v(); f15_v() ? *f15_v() : *f15_v();
+ *f15_cv(); *f15_cv(), *f15_cv(); f15_cv() ? *f15_cv() : *f15_cv();
+ *f15_vv(); *f15_vv(), *f15_vv(); f15_vv() ? *f15_vv() : *f15_vv();
+ // CHECK-NOT: load
// CHECK: ret void
}
OpenPOWER on IntegriCloud