[PATCH] D92726: Teach isKnownNonEqual how to recurse through invertable multiplies

Mikael Holmén via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 28 09:10:29 PST 2020


uabelho added a comment.

Hi,

The following starts failing with this commit:

  opt -S -o /dev/null bbi-51071.ll -early-cse

With bbi-51071.ll being

  @f.a = external global i16, align 1
  
  define void @f() {
  entry:
    store i16 ptrtoint (i16* @f.a to i16), i16* undef, align 1
    %0 = load i16, i16* undef, align 1
    %mul = mul nsw i16 %0, -1
    %1 = load i16, i16* @f.a, align 1
    %mul1 = mul nsw i16 %1, 11
    %cmp = icmp eq i16 %mul, %mul1
    %conv = zext i1 %cmp to i16
    ret void

I get

  opt: ../include/llvm/Support/Casting.h:269: typename cast_retty<X, Y *>::ret_type llvm::cast(Y *) [X = llvm::BinaryOperator, Y = const llvm::Operator]: Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92726



More information about the llvm-commits mailing list