diff options
author | Tim Murray <timmurray@google.com> | 2014-10-23 14:17:51 -0700 |
---|---|---|
committer | Tim Murray <timmurray@google.com> | 2014-10-23 14:17:51 -0700 |
commit | 9156e80250ada6f6d39af3b464a918d4855f9a2a (patch) | |
tree | bf08fffa4c3ad007f47ed5d1553202c6babfcebd /test/CodeGen/X86 | |
parent | c8db087b3b6d8767db4fa54057ac8fa448d812ca (diff) | |
download | external_llvm-9156e80250ada6f6d39af3b464a918d4855f9a2a.zip external_llvm-9156e80250ada6f6d39af3b464a918d4855f9a2a.tar.gz external_llvm-9156e80250ada6f6d39af3b464a918d4855f9a2a.tar.bz2 |
Apply rL216114 from upstream LLVM.
bug 18094492
Change-Id: Ic049d4123b9240d89daf4f3c5e8d82e8276a84e7
Diffstat (limited to 'test/CodeGen/X86')
-rw-r--r-- | test/CodeGen/X86/critical-anti-dep-breaker.ll | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/CodeGen/X86/critical-anti-dep-breaker.ll b/test/CodeGen/X86/critical-anti-dep-breaker.ll new file mode 100644 index 0000000..32d3f49 --- /dev/null +++ b/test/CodeGen/X86/critical-anti-dep-breaker.ll @@ -0,0 +1,28 @@ +; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -relocation-model=pic -post-RA-scheduler=1 -break-anti-dependencies=critical | FileCheck %s + +; PR20308 ( http://llvm.org/bugs/show_bug.cgi?id=20308 ) +; The critical-anti-dependency-breaker must not use register def information from a kill inst. +; This test case expects such an instruction to appear as a comment with def info for RDI. +; There is an anti-dependency (WAR) hazard using RAX using default reg allocation and scheduling. +; The post-RA-scheduler and critical-anti-dependency breaker can eliminate that hazard using R10. +; That is the first free register that isn't used as a param in the call to "@Image". + +@PartClass = external global i32 +@NullToken = external global i64 + +; CHECK-LABEL: Part_Create: +; CHECK-DAG: # kill: RDI<def> +; CHECK-DAG: movq PartClass@GOTPCREL(%rip), %r10 +define i32 @Part_Create(i64* %Anchor, i32 %TypeNum, i32 %F, i32 %Z, i32* %Status, i64* %PartTkn) { + %PartObj = alloca i64*, align 8 + %Vchunk = alloca i64, align 8 + %1 = load i64* @NullToken, align 4 + store i64 %1, i64* %Vchunk, align 8 + %2 = load i32* @PartClass, align 4 + call i32 @Image(i64* %Anchor, i32 %2, i32 0, i32 0, i32* %Status, i64* %PartTkn, i64** %PartObj) + call i32 @Create(i64* %Anchor) + ret i32 %2 +} + +declare i32 @Image(i64*, i32, i32, i32, i32*, i64*, i64**) +declare i32 @Create(i64*) |