Displaying 1 result from an estimated 1 matches for "geti32imm".
2013 Mar 25
1
[LLVMdev] Backend port: Adding negative immediates
Hi,
I'm doing a backend port and I'm having trouble with adds that have
negative immediates.
My architecture only has instructions for subtracting and adding 8bit
immediate values (they will be zero-extended, thus unsigned).
Bigger immediates have to be moved in a register first.
The problem is:
Expressions like "b - 1" result in "add nsw i32 %b, -1" in LLVM IR.
They