diff --git a/lib/Target/README.txt b/lib/Target/README.txt index bea240c0921..e04af6f8919 100644 --- a/lib/Target/README.txt +++ b/lib/Target/README.txt @@ -2109,33 +2109,13 @@ aggressively as malloc though. //===---------------------------------------------------------------------===// -clang -03 currently compiles this code +clang -03 doesn't optimize this: void f1(int* begin, int* end) { std::fill(begin, end, 0); } -into - -define void @_Z2f1PiS_(i32* %begin, i32* %end) nounwind { -entry: - %cmp7.i.i = icmp eq i32* %begin, %end - br i1 %cmp7.i.i, label %_ZSt4fillIPiiEvT_S1_RKT0_.exit, label %for.body.i.i - -for.body.i.i: ; preds = %entry, %for.body.i.i - %indvar.i.i = phi i64 [ %tmp, %for.body.i.i ], [ 0, %entry ] - %tmp = add i64 %indvar.i.i, 1 - %ptrincdec.i.i = getelementptr i32* %begin, i64 %tmp - %__first.addr.08.i.i = getelementptr i32* %begin, i64 %indvar.i.i - store i32 0, i32* %__first.addr.08.i.i, align 4, !tbaa !0 - %cmp.i.i = icmp eq i32* %ptrincdec.i.i, %end - br i1 %cmp.i.i, label %_ZSt4fillIPiiEvT_S1_RKT0_.exit, label %for.body.i.i - -_ZSt4fillIPiiEvT_S1_RKT0_.exit: ; preds = %for.body.i.i, %entry - ret void -} - -It should compile it to a memset. +int a memset. This is PR8942. //===---------------------------------------------------------------------===//