Unverified Commit 53fecef1 authored by Simon Pilgrim's avatar Simon Pilgrim Committed by GitHub
Browse files

[DAG] FoldConstantArithmetic - allow binop folding to work with differing...

[DAG] FoldConstantArithmetic - allow binop folding to work with differing bitcasted constants (#94863)

We currently only constant fold binop(bitcast(c1),bitcast(c2)) if c1 and c2 are both bitcasted and from the same type.

This patch relaxes this assumption to allow the constant build vector to originate from different types (and allow cases where only one operand was bitcasted).

We still ensure we bitcast back to one of the original types if both operand were bitcasted (we assume that if we have a non-bitcasted constant then its legal to keep using that type).
parent 46d94bd0
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment