[PATCH] D17782: [X86] Permit reading of the FLAGS register without it being previously defined

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 1 16:35:19 PST 2016


MatzeB added a comment.

In http://reviews.llvm.org/D17782#365923, @qcolombet wrote:

> Note: I am fine with the push/pop undef thing. But for the read flag change, I believe it would be better to mark eflags as live-in of the function.


To be honest, the whole builtin feels wrong to me. When you use the builtin you probably intend to read eflags produced by another instruction. I don't see how you would get the guarantee that the scheduler doesn't put stuff in between... Part of the problem that we read "whatever" here, is because the builtin works like that... (Though this is not a vote to take the builtin out given that it just replaces similarily hacky inline assembly or emulating as bad builtins in other compilers).


http://reviews.llvm.org/D17782





More information about the llvm-commits mailing list