[NVPTX] Annotate some instructions as hasSideEffects = 0.
authorJustin Lebar <jlebar@google.com>
Fri, 1 Apr 2016 01:09:05 +0000 (01:09 +0000)
committerJustin Lebar <jlebar@google.com>
Fri, 1 Apr 2016 01:09:05 +0000 (01:09 +0000)
commit645c3014a12cc24b75556d93db2ecfa4b99f8635
treee01a08ce74fd2d63844a508f1156f8b39f8a34ed
parentacc47105f8909c2830f1e3e5ae8ea630b21c6bd6
[NVPTX] Annotate some instructions as hasSideEffects = 0.

Summary:
Tablegen tries to infer this from the selection DAG patterns defined for
the instructions, but it can't always.

An instructive example is CLZr64.  CLZr32 is correctly inferred to have
no side-effects, but the selection DAG pattern for CLZr64 is slightly
more complicated, and in particular the ctlz DAG node is not at the root
of the pattern.  Thus tablegen can't infer that CLZr64 has no
side-effects.

Reviewers: jholewinski

Subscribers: jholewinski, tra, llvm-commits

Differential Revision: http://reviews.llvm.org/D17472

llvm-svn: 265089
llvm/lib/Target/NVPTX/NVPTXInstrInfo.td
llvm/lib/Target/NVPTX/NVPTXIntrinsics.td