(original) (raw)
Hello,
In one of the loop transformations I am developing, I need to convert eq and neq loop latch condition into less than or greater
than depending on the control flow.
The problem is that CmpInst::ICMP\_EQ and CmpInst::ICMP\_NE are neither signed nor unsigned in LLVM. Also, I did not find a way to find out if the integer operands of the CmpInst are signed or unsigned. Apparently, LLVM does not distinguish in its type system between signed and unsigned variables. So, I am not able to generate the appropriate signed or unsigned ICMP\_(S|U)LT or ICMP\_(S|U)GT.
Do you have a solution for this?
Thanks,
Dounia