[IR] Accept non-Instruction in BinaryOperator::CreateWithCopiedFlags() (NFC)
The underlying copyIRFlags() API accepts arbitrary values and can work with flags on operators (i.e. instructions or constant expressions). Remove the arbitrary limitation that the CreateWithCopiedFlags() API imposes, so we can directly pass through values matched by PatternMatch, which can be constant expressions. The attached test case works fine now, but would crash with an upcoming change to not produce and constant expressions.
Loading
Please sign in to comment