[llvm] r295004 - [X86] Add MXCSR register

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 9 08:34:20 PST 2017


On Thu, Mar 9, 2017 at 12:32 AM, Kaylor, Andrew <andrew.kaylor at intel.com> wrote:
> Hi David,
>
> Thanks for the reproducer!
>
> I think I understand what's going on now, but I'm not entirely sure what to do about it.  The problem is that the llvm.x86.sse.stmxcsr intrinsic, which gets translated directly to an stmxcsr instruction, implicitly reads the MXCSR register but nothing is defined as writing the register yet.  For most cases that would be taken care of when I add the MXCSR defs to the appropriate x86 floating point instructions, but it doesn't really solve the problem because it's perfectly legal to execute stmxcsr before anything has been done to write MXCSR.
>
> In this sense, MXCSR behaves sort of like a reserved register.  It always has a value which can be implicitly read.  However, the whole reason I introduced the modeling of that register's implicit uses is that I want to use it to restrict code motion.  So I don't think I can just add it to the reserved register set (though doing so does mask your problem).  I think it's going to require some kind of special handling.
>
> I think it probably makes sense for me to revert this change set until I can figure out a proper solution.  However, I'm not going to have time to do that until Friday.
>

Sure, reverting this friday until you figure out a better solution
looks good to me.

Thanks,

-- 
Davide

"There are no solved problems; there are only problems that are more
or less solved" -- Henri Poincare


More information about the llvm-commits mailing list