[PATCH] D93274: [DAGCombiner] Don't create sexts of deleted xors when they were in-visit replaced

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 15 05:15:53 PST 2020


spatel added a comment.

We need a codegen test to verify that the crash is fixed. I used `-emit-llvm` on the included example to get this (please reduce further if possible):

  target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
  target triple = "x86_64-apple-macosx10.15.0"
  
  define i32 @_ZN1aIlE1bEv(%class.a* nonnull dereferenceable(4) %this) {
  entry:
    %c = getelementptr inbounds %class.a, %class.a* %this, i64 0, i32 0
    %0 = load i32, i32* %c, align 4, !tbaa !3
    %conv = tail call double @llvm.experimental.constrained.sitofp.f64.i32(i32 %0, metadata !"round.dynamic", metadata !"fpexcept.ignore") #2
    %cmp = tail call i1 @llvm.experimental.constrained.fcmp.f64(double %conv, double 0.000000e+00, metadata !"oeq", metadata !"fpexcept.ignore") #2
    %not.cmp = xor i1 %cmp, true
    %cond = sext i1 %not.cmp to i32
    ret i32 %cond
  }


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D93274



More information about the llvm-commits mailing list