[RISCV] Add special case for (select cc, 1.0, 0.0) to lowerSELECT
Use sint_to_fp instead of select. Reduce the number of branch instructions and avoid generating TargetConstantPool for double. (select cc, 1.0, 0.0) -> (sint_to_fp (zext cc)) https://alive2.llvm.org/ce/z/aoEcd9 https://godbolt.org/z/n543Y9v3e (select cc, 0.0, 1.0) -> (sint_to_fp (zext (xor cc, 1))) https://alive2.llvm.org/ce/z/zngvSB Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D151719
Loading
Please sign in to comment