[llvm-dev] Code selection problem in LLVM backend
Liu winter via llvm-dev
llvm-dev at lists.llvm.org
Tue Mar 21 20:03:08 PDT 2017
Hi,
I'm currently writing a backend for a specific platform. On the target platform, "add/sub" always write a flag result. I used SDNode pattern "add/sub" for these two instructions, however this leading to a wrongly code as follows,
cmp
...
add ...
...
beq
"add" changes the flag. Desired code is:
add...
cmp
... ;No add/sub
beq
Then I tried to use SDNode pattern "addc/subc" instead, but it doesn't matter and cause some other errors. What should I do to generate code that no "add/sub" between "cmp" and "branch"?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170322/ccb1553b/attachment.html>
More information about the llvm-dev
mailing list