OSDN Git Service

PowerPC: CTR shouldn't fire if a TLS call is in the loop
authorDavid Majnemer <david.majnemer@gmail.com>
Sat, 27 Dec 2014 19:45:38 +0000 (19:45 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Sat, 27 Dec 2014 19:45:38 +0000 (19:45 +0000)
commitbd64447bf33818e565b00fcccedab4844f4c6b6f
tree6b9df7ddbde68df51ede2991802319a2dc0e3bcf
parent22376afd76214281a17a55662d007bdd799f954c
PowerPC: CTR shouldn't fire if a TLS call is in the loop

Determining the address of a TLS variable results in a function call in
certain TLS models.  This means that a simple ICmpInst might actually
result in invalidating the CTR register.

In such cases, do not attempt to rely on the CTR register for loop
optimization purposes.

This fixes PR22034.

Differential Revision: http://reviews.llvm.org/D6786

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224890 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCCTRLoops.cpp
test/CodeGen/PowerPC/ctrloops.ll