diff options
| author | Owen Anderson <resistor@mac.com> | 2009-07-13 04:09:18 +0000 |
|---|---|---|
| committer | Owen Anderson <resistor@mac.com> | 2009-07-13 04:09:18 +0000 |
| commit | 53a52215b5480bd52f1aee5189c7b08a7098fc51 (patch) | |
| tree | 20cde4af23fe30f2b0cf520520affbb0c66a53ab /llvm/lib/Target/X86/X86FastISel.cpp | |
| parent | 5302389442e928e7d8e9d07be1a4a463085d754a (diff) | |
| download | bcm5719-llvm-53a52215b5480bd52f1aee5189c7b08a7098fc51.tar.gz bcm5719-llvm-53a52215b5480bd52f1aee5189c7b08a7098fc51.zip | |
Begin the painful process of tearing apart the rat'ss nest that is Constants.cpp and ConstantFold.cpp.
This involves temporarily hard wiring some parts to use the global context. This isn't ideal, but it's
the only way I could figure out to make this process vaguely incremental.
llvm-svn: 75445
Diffstat (limited to 'llvm/lib/Target/X86/X86FastISel.cpp')
| -rw-r--r-- | llvm/lib/Target/X86/X86FastISel.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/X86/X86FastISel.cpp b/llvm/lib/Target/X86/X86FastISel.cpp index feb3d4c72e0..2b3304d19c9 100644 --- a/llvm/lib/Target/X86/X86FastISel.cpp +++ b/llvm/lib/Target/X86/X86FastISel.cpp @@ -272,7 +272,7 @@ bool X86FastISel::X86FastEmitStore(MVT VT, Value *Val, const X86AddressMode &AM) { // Handle 'null' like i32/i64 0. if (isa<ConstantPointerNull>(Val)) - Val = Constant::getNullValue(TD.getIntPtrType()); + Val = Context->getNullValue(TD.getIntPtrType()); // If this is a store of a simple constant, fold the constant into the store. if (ConstantInt *CI = dyn_cast<ConstantInt>(Val)) { @@ -672,7 +672,7 @@ bool X86FastISel::X86FastEmitCompare(Value *Op0, Value *Op1, MVT VT) { // Handle 'null' like i32/i64 0. if (isa<ConstantPointerNull>(Op1)) - Op1 = Constant::getNullValue(TD.getIntPtrType()); + Op1 = Context->getNullValue(TD.getIntPtrType()); // We have two options: compare with register or immediate. If the RHS of // the compare is an immediate that we can fold into this compare, use |

