This looks like an oversight as all the other binary operators are present.
Accidentally noticed while auditing places that need FNeg handling.
Not sure how to test this.
Differential D62790
[CFLGraph] Add FAdd to visitConstantExpr. craig.topper on Jun 1 2019, 9:51 PM. Authored by
Details This looks like an oversight as all the other binary operators are present. Accidentally noticed while auditing places that need FNeg handling. Not sure how to test this.
Diff Detail
Event TimelineComment Actions Thanks for this! I'm not super concerned about testing for this patch, since fadd can't operate on pointer types, so both assign edges would just get dropped anyway. It'd boil down to "let's not crash on this one known case," when we have many known cases in reality. :) (If you really want a test, I'd assume it'd involve forcing an fadd to appear in $X in something like getelementptr inbounds ([50 x i8], [50 x i8]* @cs, i64 0, i64 $X). ConstProp/bitcast.ll creatively does that: ret i1 icmp eq (i32 ptrtoint (i16* @a to i32), i32 bitcast (float fadd (float bitcast (i32 ptrtoint (i16* @b to i32) to float), float 2.000000e+00) to i32)), but again, I'm happy without it.) |