[llvm-commits] [llvm] r158004 - /llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp
Roman Divacky
rdivacky at freebsd.org
Tue Jun 5 10:14:17 PDT 2012
Author: rdivacky
Date: Tue Jun 5 12:14:17 2012
New Revision: 158004
URL: http://llvm.org/viewvc/llvm-project?rev=158004&view=rev
Log:
PPC32 uses R2 as the TLS register. Fix the copy and paste.
Modified:
llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp
Modified: llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp?rev=158004&r1=158003&r2=158004&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp Tue Jun 5 12:14:17 2012
@@ -1239,9 +1239,9 @@
if (model != TLSModel::LocalExec)
llvm_unreachable("only local-exec TLS mode supported");
- SDValue R13 = DAG.getRegister(is64bit ? PPC::X13 : PPC::R13,
- is64bit ? MVT::i64 : MVT::i32);
- SDValue Hi = DAG.getNode(PPCISD::Hi, dl, PtrVT, TGAHi, R13);
+ SDValue TLSReg = DAG.getRegister(is64bit ? PPC::X13 : PPC::R2,
+ is64bit ? MVT::i64 : MVT::i32);
+ SDValue Hi = DAG.getNode(PPCISD::Hi, dl, PtrVT, TGAHi, TLSReg);
return DAG.getNode(PPCISD::Lo, dl, PtrVT, TGALo, Hi);
}
More information about the llvm-commits
mailing list