[llvm] [X86] Try Folding icmp of v8i32 -> fcmp of v8f32 on AVX (PR #82290)

via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 25 23:43:36 PST 2024


goldsteinn wrote:

> Maybe we're talking about different things then, sorry. I thought this was in relation to when we can or cannot bitcast integers to floats and do comparison as floats. For example, I think the restriction on C in `src_ule_bitcast -> tgt_ule_bitcast` is that it must be between 1 << 23 and the existing bound, not just 0 and the bound.

Ah that is another issue...

So there are two issues with DAZ:
1) `bitcast` only check ops < inf_bits
2)  `simplifySExtOfDecomposedSetCC` will simplify op `lt`/`gt` 0.0 (what I thought you where referencing).

Think both probably need to be fixed.

Still re:
> We should probably disable it regardless of the compiler settings because it'd be weird for FP flags to invalidate what looks like integer comparisons....

Do you mean drop the optimization (if we can't prove normal)? Don't really see whats the issue with seeing if we are compiling with DAZ.

https://github.com/llvm/llvm-project/pull/82290


More information about the llvm-commits mailing list