[PATCH] D28251: [AArch64] Fix over-eager early-exit in load-store combiner
Chad Rosier via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 4 11:31:02 PST 2017
mcrosier added a comment.
I think this test case exposes the underlying issue:
define i64 @test(i64* %a) nounwind {
%p1 = getelementptr inbounds i64, i64* %a, i32 64
%tmp1 = load i64, i64* %p1, align 2
%p2 = getelementptr inbounds i64, i64* %a, i32 63
%tmp2 = load i64, i64* %p2, align 2
%tmp3 = add i64 %tmp1, %tmp2
ret i64 %tmp3
}
When you run llc make sure to disable the scheduler so that the instructions aren't reordered by using -enable-misched=false and -enable-post-misched=false.
Reproduce with:
llc -mtriple=aarch64-linux-gnu -aarch64-enable-atomic-cfg-tidy=0 -disable-lsr -verify-machineinstrs -enable-misched=false -enable-post-misched=false -o - test.ll
If I'm not mistaken, without this patch we won't pair the instructions.
https://reviews.llvm.org/D28251
More information about the llvm-commits
mailing list