[PATCH] D45907: AMDGPU/GlobalISel: Implement select() for @llvm.amdgcn.cvt.pkrtz

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 21 05:43:11 PDT 2018


arsenm added a comment.

Have you tried enabling the tablegen selector build? I’ve been avoiding commiting any of these kind of simple selectors without that



================
Comment at: lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp:155
+  switch (IntrinsicID) {
+  default: break;
+  case Intrinsic::amdgcn_cvt_pkrtz:
----------------
Separate line


================
Comment at: lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp:553
+    switch (I.getOperand(1).getIntrinsicID()) {
+      default: break;
+      case Intrinsic::amdgcn_cvt_pkrtz:
----------------
Ditto


================
Comment at: test/CodeGen/AMDGPU/GlobalISel/inst-select-amdgcn.cvt.pkrtz.mir:4-8
+  define void @cvt_pkrtz(i32 addrspace(1)* %global0) { ret void }
+
+  declare <2 x half> @llvm.amdgcn.cvt.pkrtz(float, float) #0
+
+  attributes #0 = { readnone speculatable }
----------------
I think you can drop the IR section, even with the intrinsic declaration


Repository:
  rL LLVM

https://reviews.llvm.org/D45907





More information about the llvm-commits mailing list