mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
xref a PR #
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123141 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b79cb79a46
commit
7cc4e304a6
@ -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.
|
||||
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user