[PATCH] D77448: [PowerPC] Canonicalize shuffles to match more single-instruction masks on LE

Nathan Chancellor via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 19 21:39:36 PDT 2020


nathanchance added a comment.

Hi! This patch causes a crash when compiling the Linux kernel with certain distribution configs:

  $ git bisect log
  # bad: [b885b1b92d3d9bfcc8229476f4ad4660305d6160] [mlir] Fix gcc build break due to previous commit
  # good: [158e734af19d6be206f80c213a028b569c441b24] [ARM] Adjust AND/OR combines to not call isConstantSplat on i1 vectors. NFC.
  git bisect start 'b885b1b92d3d9bfcc8229476f4ad4660305d6160' '158e734af19d6be206f80c213a028b569c441b24'
  # good: [fcd67665a8de61223313e1e1582faf17d9ee76b8] [StackSafety] Add "Must Live" logic
  git bisect good fcd67665a8de61223313e1e1582faf17d9ee76b8
  # bad: [d3b752845df0331348dad48000fc8b82afb3de5b] [clang][test][NFC] Also test for serialization in AST dump tests, part 1/n.
  git bisect bad d3b752845df0331348dad48000fc8b82afb3de5b
  # bad: [bb480056602daab86fbcd6aac5c6bc92ce350bb3] [NFC] Make AST_BLOCK_HASH test more robust with downstream changes
  git bisect bad bb480056602daab86fbcd6aac5c6bc92ce350bb3
  # bad: [d938ec4509c47d461377527fc2877ae14b91275c] [AArch64] Avoid incompatibility between SLSBLR mitigation and BTI codegen.
  git bisect bad d938ec4509c47d461377527fc2877ae14b91275c
  # good: [9ca50e887db7f903c04a90593d2beed8a96794f1] [libTooling] Add parser for string representation of `RangeSelector`.
  git bisect good 9ca50e887db7f903c04a90593d2beed8a96794f1
  # bad: [1fed131660b2c5d3ea7007e273a7a5da80699445] [PowerPC] Canonicalize shuffles to match more single-instruction masks on LE
  git bisect bad 1fed131660b2c5d3ea7007e273a7a5da80699445
  # good: [9c9b71a2908d47ebd65cb7c2e1e499484aaa547e] [gn build] Port 9ca50e887db
  git bisect good 9c9b71a2908d47ebd65cb7c2e1e499484aaa547e
  # good: [8f3b2c8aa3175628128a32a6bcaecc67efd03514] AMDGPU/GlobalISel: Remove selection of MAD/MAC when not available
  git bisect good 8f3b2c8aa3175628128a32a6bcaecc67efd03514
  # first bad commit: [1fed131660b2c5d3ea7007e273a7a5da80699445] [PowerPC] Canonicalize shuffles to match more single-instruction masks on LE

To reproduce with the Linux kernel source tree:

  $ mkdir -p out/ppc64le
  
  $ curl -LSso out/ppc64le/.config 'https://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git/plain/fedora/configs/kernel-5.6.17-ppc64le.config?h=kernel-5.6.17-300.fc32'
  
  $ make -skj"$(nproc)" ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu- LD=powerpc64le-linux-gnu-ld LLVM=1 O=out/ppc64le OBJDUMP=powerpc64le-linux-gnu-objdump olddefconfig drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn20/display_mode_vba_20.o
  ...
  fatal error: error in backend: Cannot select: t146: v16i8 = PPCISD::SCALAR_TO_VECTOR_PERMUTED t110, drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn20/display_mode_vba_20.c:2855:3 @[ drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn20/display_mode_vba_20.c:241:2 ]
    t110: i32 = any_extend t32, drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn20/display_mode_vba_20.c:2855:3 @[ drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn20/display_mode_vba_20.c:241:2 ]
      t32: i1,ch = CopyFromReg t0, Register:i1 %31, drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn20/display_mode_vba_20.c:2855:3 @[ drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn20/display_mode_vba_20.c:241:2 ]
        t31: i1 = Register %31
  In function: dml20_recalculate
  clang-11: error: clang frontend command failed with exit code 70 (use -v to see invocation)
  ClangBuiltLinux clang version 11.0.0 (https://github.com/llvm/llvm-project b885b1b92d3d9bfcc8229476f4ad4660305d6160)
  ...

cvise spits out (not cleaned up or anything):

  enum { a, b } c;
  d;
  e() {
    _Bool f = a;
    for (; d; ++d)
      if (c)
        f = b;
    if (f)
      g();
  }

Interestingness test and original preprocessed file available here: https://github.com/nathanchance/creduce-files/tree/ac42e9b24f969b3bd8a72d0a8be0bccb88e570d2/D77448


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77448





More information about the llvm-commits mailing list