Hi Chris,

> +          (CE->getOpcode() == Instruction::BitCast || 
> +           CE->getOpcode() == Instruction::GetElementPtr))
> +        return dyn_cast<GlobalValue>(CE->getOperand(0));

isn't this only correct if all the GEP indices are zero?
By the way, ExtractGlobalVariable in SelectionDAGISel does
the same thing as this function, maybe they should be combined?

Ciao,

Duncan.
_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to