summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhou Sheng <zhousheng00@gmail.com>2009-01-30 09:02:50 +0000
committerZhou Sheng <zhousheng00@gmail.com>2009-01-30 09:02:50 +0000
commit25b6f8153e341de4948d42b125e438fa79c508e8 (patch)
tree5c39080b6fb792f1ffbe29a2c85d30a73e07e5be
parentc10d810303e2ba18d6723f47a31d2da40ae4af25 (diff)
downloadbcm5719-llvm-25b6f8153e341de4948d42b125e438fa79c508e8.tar.gz
bcm5719-llvm-25b6f8153e341de4948d42b125e438fa79c508e8.zip
This is to fix the bug in IntrinsicLowering.cpp,
the LowerPartSet(). It didn't handle the situation correctly when the low, high argument values are in reverse order (low > high) with 'Val' type i32 (a corner case). llvm-svn: 63388
-rw-r--r--llvm/lib/CodeGen/IntrinsicLowering.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/IntrinsicLowering.cpp b/llvm/lib/CodeGen/IntrinsicLowering.cpp
index 960d660cb94..0ef9706668b 100644
--- a/llvm/lib/CodeGen/IntrinsicLowering.cpp
+++ b/llvm/lib/CodeGen/IntrinsicLowering.cpp
@@ -533,7 +533,8 @@ static Instruction *LowerPartSet(CallInst *CI) {
Lo = new ZExtInst(Lo_pn, ValTy, "", entry);
} else if (ValBits < 32) {
Lo = new TruncInst(Lo_pn, ValTy, "", entry);
- }
+ } else
+ Lo = Lo_pn;
// Determine if the replacement bits are larger than the number of bits we
// are replacing and deal with it.
ICmpInst* is_large =
OpenPOWER on IntegriCloud