[PATCH] D54331: AMDGPU : median3 matching incomplete or not working

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 9 11:04:57 PST 2018


arsenm added inline comments.


================
Comment at: lib/Target/AMDGPU/SIInstructions.td:582
 >;
-// TODO: we could add more variants for other types of conditionals
+
+  // TODO: we could add more variants for other types of conditionals
----------------
Extra whitespace change


================
Comment at: test/CodeGen/AMDGPU/umed3.ll:368
+; GCN: v_med3_i32 v{{[0-9]+}}, s{{[0-9]+}}, v{{[0-9]+}}, v{{[0-9]+}}
+define amdgpu_kernel void @v_med3_i32_test(i32 addrspace(1)* %arg, i32, i32, i32) {
+  %4 = icmp slt i32 %0, %1
----------------
The signed version should go in smed3.ll

This could also use the helper functions like the rest of the tests. Should also have the various permutations


================
Comment at: test/CodeGen/AMDGPU/umed3.ll:369
+define amdgpu_kernel void @v_med3_i32_test(i32 addrspace(1)* %arg, i32, i32, i32) {
+  %4 = icmp slt i32 %0, %1
+  %5 = select i1 %4, i32 %0, i32 %1
----------------
Run instnamer on this


https://reviews.llvm.org/D54331





More information about the llvm-commits mailing list