diff options
author | Hal Finkel <hfinkel@anl.gov> | 2014-12-25 23:08:25 +0000 |
---|---|---|
committer | Hal Finkel <hfinkel@anl.gov> | 2014-12-25 23:08:25 +0000 |
commit | 0c505b08a53a8cd96124264512f4bdf81e648f72 (patch) | |
tree | ccd63c8bf37335d1ae6efd7f87d33025896c2cfd /llvm/lib/Target/PowerPC/PPCFastISel.cpp | |
parent | b723834d82961103dcaf75dd8fa98eb81ca092ff (diff) | |
download | bcm5719-llvm-0c505b08a53a8cd96124264512f4bdf81e648f72.tar.gz bcm5719-llvm-0c505b08a53a8cd96124264512f4bdf81e648f72.zip |
[PowerPC] [FastISel] i1 constants must be zero extended
When materializing constant i1 values, they must be zero extended. We represent
i1 values as [0, 1], not [0, -1], in i32 registers. As it turns out, this code
path was dead for i1 values prior to r216006 (which is why this did not manifest in
miscompiles until recently).
Fixes -O0 self-hosting on PPC64/Linux.
llvm-svn: 224842
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCFastISel.cpp')
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCFastISel.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCFastISel.cpp b/llvm/lib/Target/PowerPC/PPCFastISel.cpp index d558bb128eb..7af9101e537 100644 --- a/llvm/lib/Target/PowerPC/PPCFastISel.cpp +++ b/llvm/lib/Target/PowerPC/PPCFastISel.cpp @@ -2109,7 +2109,7 @@ unsigned PPCFastISel::fastMaterializeConstant(const Constant *C) { else if (const GlobalValue *GV = dyn_cast<GlobalValue>(C)) return PPCMaterializeGV(GV, VT); else if (isa<ConstantInt>(C)) - return PPCMaterializeInt(C, VT); + return PPCMaterializeInt(C, VT, VT != MVT::i1); return 0; } |