[GlobalIsel][AMDGPU] Changing legalize rule for G_{UADDO|UADDE|USUBO|USUBE|SADDE|SSUBE}
Generic add and sub with carry are now legalized in a way to explicitly calculate carry/borrow output. i.e %6:_(s64), %7:_(s1) = G_UADDO %0, %1 becomes, %13:_(s32), %14:_(s1) = G_UADDO %2, %4 %15:_(s32), %16:_(s1) = G_UADDE %3, %5, %14 %6:_(s64) = G_MERGE_VALUES %13(s32), %15(s32) %7:_(s1) = G_ICMP intpred(ult), %6(s64), %1 Here G_MERGE and G_ICMP instructions are redundant for recalculating carry output. (Similar case for sub with borrow) This change fix this. Reviewed By: arsenm, #amdgpu Differential Revision: https://reviews.llvm.org/D137932
Loading
Please sign in to comment