summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/ConstantFold.cpp
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2010-12-20 13:10:23 +0000
committerDuncan Sands <baldrick@free.fr>2010-12-20 13:10:23 +0000
commit70db5e7cb20e180b9c9973f56bc174778d16863b (patch)
tree8cfc4957ed7a5376affa7e2b66c0675a9f8addae /llvm/lib/VMCore/ConstantFold.cpp
parent5a2ce5fbf7b9f8b483ccb832636a5706108e1379 (diff)
downloadbcm5719-llvm-70db5e7cb20e180b9c9973f56bc174778d16863b.tar.gz
bcm5719-llvm-70db5e7cb20e180b9c9973f56bc174778d16863b.zip
There is no need for isAssociative to take the type as an argument anymore.
llvm-svn: 122242
Diffstat (limited to 'llvm/lib/VMCore/ConstantFold.cpp')
-rw-r--r--llvm/lib/VMCore/ConstantFold.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/VMCore/ConstantFold.cpp b/llvm/lib/VMCore/ConstantFold.cpp
index 2309f2274bf..5c284b746de 100644
--- a/llvm/lib/VMCore/ConstantFold.cpp
+++ b/llvm/lib/VMCore/ConstantFold.cpp
@@ -1338,8 +1338,7 @@ Constant *llvm::ConstantFoldBinaryInstruction(unsigned Opcode,
// Given ((a + b) + c), if (b + c) folds to something interesting, return
// (a + (b + c)).
- if (Instruction::isAssociative(Opcode, C1->getType()) &&
- CE1->getOpcode() == Opcode) {
+ if (Instruction::isAssociative(Opcode) && CE1->getOpcode() == Opcode) {
Constant *T = ConstantExpr::get(Opcode, CE1->getOperand(1), C2);
if (!isa<ConstantExpr>(T) || cast<ConstantExpr>(T)->getOpcode() != Opcode)
return ConstantExpr::get(Opcode, CE1->getOperand(0), T);
OpenPOWER on IntegriCloud