[PowerPC] Mark the BDNZ intrinsic as NoDuplicate
commitdc9a6a7dba43a473a6e317db5e8e5f29988a5fd5
authorNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Tue, 17 Apr 2018 13:07:01 +0000 (17 13:07 +0000)
committerNemanja Ivanovic <nemanja.i.ibm@gmail.com>
Tue, 17 Apr 2018 13:07:01 +0000 (17 13:07 +0000)
tree46fd2819666108192dda47231f889f60aeaa7a85
parentafb8c1fed21eb4848d86f2d28e9cb3afcfbb2656
[PowerPC] Mark the BDNZ intrinsic as NoDuplicate

Duplicating this intrinsic is not generally valid because it has the side-effect
of decrementing the CTR. Any passes that duplicate it would need to be taught to
keep the regions formed completely disjoint.
This patch should be NFC for typical uses as CTRLoops runs after the remaining
loop passes. It only affects situations where the loop passes are scheduled on
the IR after the codegen passes (as is the case with some JIT pipelines).

Fixes https://bugs.llvm.org/show_bug.cgi?id=37050

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330186 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/IntrinsicsPowerPC.td
test/CodeGen/PowerPC/no-dup-of-bdnz.ll [new file with mode: 0644]