[PATCH] D59543: [AMDGPU] Ban i8 min3 promotion.

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 19 07:22:57 PDT 2019


arsenm added inline comments.


================
Comment at: test/CodeGen/AMDGPU/min3_i8.ll:4
+; GCN-LABEL: amdgpu_ps_main:
+define amdgpu_ps void @_amdgpu_ps_main(<2 x i32> %arg, i32 %arg1, i32 inreg %arg2) {
+  %tmp = bitcast <2 x i32> %arg to i64
----------------
sheredom wrote:
> arsenm wrote:
> > I doubt we need a new test for this. Can you just add the trivial cases to test/CodeGen/AMDGPU/min3? (and the corresponding max3). Also should have some weird types, like i7, and i33
> Happy to add more test cases there - but when I tried the simple thing here LLVM was promoting the i8's -> higher types early and thus not encountering the bug.
> 
> To actually get the weird bug I found you needed every single statement in the .ll here, which is crazy because a bunch of the statements don't even take part in the operation.
> 
> If you think I should just remove this test case though it's your call.
A test is definitely necessary. You should be able to reproduce this with a simpler test. You definitely shouldn't need all of this complex WWM stuff to do it


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59543/new/

https://reviews.llvm.org/D59543





More information about the llvm-commits mailing list