diff options
author | Robert Bocchino <bocchino@illinois.edu> | 2004-07-27 21:02:21 +0000 |
---|---|---|
committer | Robert Bocchino <bocchino@illinois.edu> | 2004-07-27 21:02:21 +0000 |
commit | 7b5b86cd0f696820280fbaae19a0cc6e5d1c59d4 (patch) | |
tree | b3ab6ec0389073c786d6a1cdc2e16f4ab18eabce /llvm/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp | |
parent | 22fddc7d16cf617fd8b6a7ca3943e2bff54daf43 (diff) | |
download | llvm-7b5b86cd0f696820280fbaae19a0cc6e5d1c59d4.zip llvm-7b5b86cd0f696820280fbaae19a0cc6e5d1c59d4.tar.gz llvm-7b5b86cd0f696820280fbaae19a0cc6e5d1c59d4.tar.bz2 |
This change fixed a bug in the function visitMul. The prior version
assumed that a constant on the RHS of a multiplication was either an
IntConstant or an FPConstant. It checked for an IntConstant and then,
if it did not find one, did a hard cast to an FPConstant. That code
would crash if the RHS were a ConstantExpr that was neither an
IntConstant nor an FPConstant. This version replaces the hard cast
with a dyn_cast. It performs the same way for IntConstants and
FPConstants but does nothing, instead of crashing, for constant
expressions.
The regression test for this change is 2004-07-27-ConstantExprMul.ll.
llvm-svn: 15291
Diffstat (limited to 'llvm/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp')
0 files changed, 0 insertions, 0 deletions