search for: result_zext

Displaying 3 results from an estimated 3 matches for "result_zext".

2019 Feb 09
2
how experimental are the llvm.experimental.vector.reduce.* functions?
...x, metadata !50, metadata !DIExpression()), !dbg !57 ret void, !dbg !58 } You can see this takes advantage of @llvm.sadd.with.overflow, which is not available with vectors. So here is a different approach (pseudocode): %a_zext = zext %a to i33 # 1 more bit %b_zext = zext %b to i33 # 1 more bit %result_zext = add %a_zext, %b_zext %max_result = @llvm.experimental.vector.reduce.umax(%result_zext) %overflow = icmp %max_result > @max_i32_value %result = trunc %result_zext to i32 You can imagine how this would work for signed integers, replacing zext with sext and umax with smax. This depends on an &q...
2019 Feb 09
2
how experimental are the llvm.experimental.vector.reduce.* functions?
...!58 >> } >> >> You can see this takes advantage of @llvm.sadd.with.overflow, which is >> not available with vectors. So here is a different approach (pseudocode): >> >> %a_zext = zext %a to i33 # 1 more bit >> %b_zext = zext %b to i33 # 1 more bit >> %result_zext = add %a_zext, %b_zext >> %max_result = @llvm.experimental.vector.reduce.umax(%result_zext) >> %overflow = icmp %max_result > @max_i32_value >> %result = trunc %result_zext to i32 >> >> You can imagine how this would work for signed integers, replacing zext >>...
2019 Feb 09
2
how experimental are the llvm.experimental.vector.reduce.* functions?
...>>> You can see this takes advantage of @llvm.sadd.with.overflow, which is >>> not available with vectors. So here is a different approach (pseudocode): >>> >>> %a_zext = zext %a to i33 # 1 more bit >>> %b_zext = zext %b to i33 # 1 more bit >>> %result_zext = add %a_zext, %b_zext >>> %max_result = @llvm.experimental.vector.reduce.umax(%result_zext) >>> %overflow = icmp %max_result > @max_i32_value >>> %result = trunc %result_zext to i32 >>> >>> You can imagine how this would work for signed integers, rep...