mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-22 11:39:35 +00:00
ArrayRef ca accept one element. Simplify code a little bit, also it matches now
coding in the other places of the file. llvm-svn: 176641
This commit is contained in:
parent
b23f8be448
commit
2b0d2f9f99
@ -474,10 +474,12 @@ bool CallAnalyzer::visitCastInst(CastInst &I) {
|
||||
|
||||
bool CallAnalyzer::visitUnaryInstruction(UnaryInstruction &I) {
|
||||
Value *Operand = I.getOperand(0);
|
||||
Constant *Ops[1] = { dyn_cast<Constant>(Operand) };
|
||||
if (Ops[0] || (Ops[0] = SimplifiedValues.lookup(Operand)))
|
||||
Constant *COp = dyn_cast<Constant>(Operand);
|
||||
if (!COp)
|
||||
COp = SimplifiedValues.lookup(Operand);
|
||||
if (COp)
|
||||
if (Constant *C = ConstantFoldInstOperands(I.getOpcode(), I.getType(),
|
||||
Ops, TD)) {
|
||||
COp, TD)) {
|
||||
SimplifiedValues[&I] = C;
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user