[PATCH] D21190: [InstCombine] allow more than one use for vector cast folding with selects

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 9 13:15:38 PDT 2016


eli.friedman added a comment.

Something like this?

  loop:
    %sel = select <4 x i1> %cmp, <4 x i32> %selx, <4 x i32> %selx
    %selx = bitcast <4 x i32> %sel to <4 x f32>
    br label %loop

Your optimization flips the types of the select and the bitcast, I think.  Obviously not an actual testcase because it's missing PHI nodes, but that's the basic idea.


http://reviews.llvm.org/D21190





More information about the llvm-commits mailing list