[all-commits] [llvm/llvm-project] 0adb0f: [ConstProp] Don't fallthorugh for poison constants...

David Green via All-commits all-commits at lists.llvm.org
Mon Aug 8 12:23:03 PDT 2022


  Branch: refs/heads/release/15.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 0adb0f9a97c7cd6e6d315d533b4db452456ebe13
      https://github.com/llvm/llvm-project/commit/0adb0f9a97c7cd6e6d315d533b4db452456ebe13
  Author: David Green <david.green at arm.com>
  Date:   2022-08-08 (Mon, 08 Aug 2022)

  Changed paths:
    M llvm/lib/Analysis/ConstantFolding.cpp
    M llvm/test/Transforms/InstSimplify/ConstProp/ARM/mve-vctp.ll
    M llvm/test/Transforms/InstSimplify/ConstProp/active-lane-mask.ll

  Log Message:
  -----------
  [ConstProp] Don't fallthorugh for poison constants on vctp and active_lane_mask.

Given a poison constant as input, the dyn_cast to a ConstantInt would
fail so we would fall through to the generic code that attempts to fold
each element of the input vectors. The inputs to these intrinsics are
not vectors though, leading to a compile time crash. Instead bail out
properly for poison values by returning nullptr. This doesn't try to
define what poison means for these intrinsics.

Fixes #56945

(cherry picked from commit b2de84633a0a262b894e7cf87d29b167787aa2d6)




More information about the All-commits mailing list