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

David Green via All-commits all-commits at lists.llvm.org
Fri Aug 5 03:19:57 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b2de84633a0a262b894e7cf87d29b167787aa2d6
      https://github.com/llvm/llvm-project/commit/b2de84633a0a262b894e7cf87d29b167787aa2d6
  Author: David Green <david.green at arm.com>
  Date:   2022-08-05 (Fri, 05 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




More information about the All-commits mailing list