[PowerPC] Fix %llvm.ppc.altivec.vc* lowering
commit7e0fd77645cf6eae1994b255a307b016180c8a83
authorJim Lin <tclin914@gmail.com>
Mon, 16 Dec 2019 02:18:50 +0000 (16 10:18 +0800)
committerJim Lin <tclin914@gmail.com>
Mon, 16 Dec 2019 02:21:55 +0000 (16 10:21 +0800)
treedc6f38e735520412d07303c1863a7cca55fc2104
parentc0143f37dab38a2da27c9bb6f44f3a54ca9cf86f
[PowerPC] Fix %llvm.ppc.altivec.vc* lowering

Summary:
r372285 changed LLVM to use a `TargetConstant` for parameters of intrinsics that are required to be immediates.

Since that commit, use of `%llvm.ppc.altivec.vc{fsx,fux,tsxs,tuxs}` intrinsics has not worked, and resulted in a `LLVM ERROR: Cannot select: intrinsic %llvm.ppc.altivec.vc*` error. The intrinsics' TableGen definitions matched on `imm` instead of `timm`.

This commit updates those definitions to use `timm`.

Fixes: https://llvm.org/PR44239

Reviewers: hfinkel, nemanjai, #powerpc, Jim

Reviewed By: Jim

Subscribers: qiucf, wuzish, Jim, hiraditya, kbarton, jsji, shchenz, llvm-commits

Tags: #llvm

Patched by vddvss (Colin Samples).

Differential Revision: https://reviews.llvm.org/D71138
llvm/lib/Target/PowerPC/PPCInstrAltivec.td
llvm/test/CodeGen/PowerPC/pr44239.ll [new file with mode: 0644]