[llvm-commits] [SignlessTypes] CVS: llvm/lib/VMCore/ConstantFolding.cpp
Reid Spencer
reid at x10sys.com
Fri Oct 20 01:01:41 PDT 2006
Changes in directory llvm/lib/VMCore:
ConstantFolding.cpp updated: 1.93.2.4 -> 1.93.2.5
---
Log message:
Make this compile after Constants.h interface changes.
---
Diffs of the changes: (+4 -4)
ConstantFolding.cpp | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
Index: llvm/lib/VMCore/ConstantFolding.cpp
diff -u llvm/lib/VMCore/ConstantFolding.cpp:1.93.2.4 llvm/lib/VMCore/ConstantFolding.cpp:1.93.2.5
--- llvm/lib/VMCore/ConstantFolding.cpp:1.93.2.4 Thu Oct 19 23:27:18 2006
+++ llvm/lib/VMCore/ConstantFolding.cpp Fri Oct 20 03:01:26 2006
@@ -505,10 +505,10 @@
if (V2->isNullValue())
return 0;
if (V2->isAllOnesValue() && // MIN_INT / -1
- (BuiltinType)V1->getRawValue() == -(BuiltinType)V1->getRawValue())
+ (BuiltinType)V1->getZExtValue() == -(BuiltinType)V1->getZExtValue())
return 0;
BuiltinType R =
- (BuiltinType)V1->getRawValue() / (BuiltinType)V2->getRawValue();
+ (BuiltinType)V1->getZExtValue() / (BuiltinType)V2->getZExtValue();
return ConstantInt::get(*Ty, R);
}
@@ -516,10 +516,10 @@
if (V2->isNullValue())
return 0;
if (V2->isAllOnesValue() && // MIN_INT / -1
- (BuiltinType)V1->getZExtValue() == -(BuiltinType)V1->getZExtValue())
+ (BuiltinType)V1->getSExtValue() == -(BuiltinType)V1->getSExtValue())
return 0;
BuiltinType R =
- (BuiltinType)V1->getZExtValue() / (BuiltinType)V2->getZExtValue();
+ (BuiltinType)V1->getSExtValue() / (BuiltinType)V2->getSExtValue();
return ConstantInt::get(*Ty, R);
}
More information about the llvm-commits
mailing list