]> granicus.if.org Git - llvm/commit
GlobalISel: Handle llvm.read_register
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 1 Oct 2019 02:07:16 +0000 (02:07 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 1 Oct 2019 02:07:16 +0000 (02:07 +0000)
commitaf5c54f584411209519fb1a85b96d7041bf6910f
treee22d9435f8d15922462ae69c35712214b6c94bfd
parent900bd7250eec2e6659dd8490028b8233fb61e88e
GlobalISel: Handle llvm.read_register

SelectionDAG has a bunch of machinery to defer this to selection time
for some reason. Just directly emit a copy during IRTranslator. The
x86 usage does somewhat questionably check hasFP, which could depend
on the whole function being at minimum translated.

This does lose the convergent bit if the callsite had it, which may be
a problem. We also lose that in general for intrinsics, which may also
be a problem.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373294 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/GlobalISel/IRTranslator.cpp
test/CodeGen/AMDGPU/GlobalISel/read_register.ll [new file with mode: 0644]
test/CodeGen/AMDGPU/read_register.ll