This is to simplify icmp instructions in the form like:
%cmp = icmp eq i32 (i8*, i8*)* bitcast (i32 (i32**, i32**)* @f32 to i32 (i8*, i8*)), bitcast (i32 (i64**, i64**) @f64 to i32 (i8*, i8*)*)
Here @f32 and @f64 are two functions.
Differential D87850
[ConstantFold] Fold the comparison of bitcasted global values scui on Sep 17 2020, 12:24 PM. Authored by
Details This is to simplify icmp instructions in the form like: %cmp = icmp eq i32 (i8*, i8*)* bitcast (i32 (i32**, i32**)* @f32 to i32 (i8*, i8*)), bitcast (i32 (i64**, i64**) @f64 to i32 (i8*, i8*)*) Here @f32 and @f64 are two functions.
Diff Detail
Event Timeline
Comment Actions LGTM Do you have commit access? If not, I can commit it for you; what should I put in the git "Author" line? Comment Actions Thanks. I don't have commit access. The author line should be --author="Shimin Cui <scui@ca.ibm.com>". |
I guess this handles the case where both operands are bitcasts due to other folds?
Is it possible to end up in a situation where one operand is a bitcast, and the other is a GEP? I guess we could leave that as an area for future improvement.