[all-commits] [llvm/llvm-project] fcd512: [X86][AVX] Extract SUBV_BROADCAST constant bits fr...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Wed Aug 18 12:16:13 PDT 2021


  Branch: refs/heads/release/13.x
  Home:   https://github.com/llvm/llvm-project
  Commit: fcd5126bfba8c00b772808812ac35b66c1f43fa1
      https://github.com/llvm/llvm-project/commit/fcd5126bfba8c00b772808812ac35b66c1f43fa1
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2021-08-18 (Wed, 18 Aug 2021)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/pr51281.ll

  Log Message:
  -----------
  [X86][AVX] Extract SUBV_BROADCAST constant bits from just the lower subvector range (PR51281)

As reported on PR51281, an internal fuzz test encountered an issue when extracting constant bits from a SUBV_BROADCAST node from a constant pool source larger than the broadcasted subvector width.

The getTargetConstantBitsFromNode was assuming that the Constant would the same size as the subvector, resulting in the incorrect packing of the per-element bits data.

This patch attempts to solve this by using the SUBV_BROADCAST node to determine the subvector width, and then ensuring we extract only the lowest bits from Constant of that subvector bitsize.

Differential Revision: https://reviews.llvm.org/D107158

(cherry picked from commit 18e6a03b1a15b2661259af15ae604b4c4850cd61)




More information about the All-commits mailing list