This is to fix the bug in IntrinsicLowering.cpp,
authorZhou Sheng <zhousheng00@gmail.com>
Fri, 30 Jan 2009 09:02:50 +0000 (09:02 +0000)
committerZhou Sheng <zhousheng00@gmail.com>
Fri, 30 Jan 2009 09:02:50 +0000 (09:02 +0000)
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).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63388 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/IntrinsicLowering.cpp

index 960d660cb946866a1d50a01e9bbe5622d5ddbfa5..0ef9706668b8260ea1a8a3871c62a7b3e17279bb 100644 (file)
@@ -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 =