Revert "[SCCP] Use SimplifyBinOp for non-integer constant/expressions & overdef."
This reverts commit 1a02aaea. Crashes on the following test case: $ cat crash.ll source_filename = "__compute_module" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-grtev4-linux-gnu" @0 = private unnamed_addr constant [24 x i8] c"\00\00\C0\7F\00\00\C0\7F\09\85\08?\ED\C94\FE~\EB/\F3\90\CF\BA\C1" @1 = private unnamed_addr constant [24 x i8] c"\00\00\C0\7F\A3\A0\0FA\00\00\C0\7F\00\00\C0\7F\00\00\00\00\02\9AA\00" define void @IgammaSpecialValues.448() { entry: br label %fusion.26.loop_header.dim.0 fusion.26.loop_header.dim.0: ; preds = %fusion.26.loop_header.dim.0, %entry %fusion.26.invar_address.dim.0.0 = phi i64 [ 0, %entry ], [ %invar.inc17, %fusion.26.loop_header.dim.0 ] %0 = getelementptr inbounds [6 x float], [6 x float]* bitcast ([24 x i8]* @0 to [6 x float]*), i64 0, i64 %fusion.26.invar_address.dim.0.0 %1 = load float, float* %0 %2 = fmul float %1, 0.000000e+00 %3 = getelementptr inbounds [6 x float], [6 x float]* bitcast ([24 x i8]* @1 to [6 x float]*), i64 0, i64 %fusion.26.invar_address.dim.0.0 %4 = load float, float* %3 %5 = fneg float %4 %6 = fadd float %2, %5 %invar.inc17 = add nuw nsw i64 %fusion.26.invar_address.dim.0.0, 1 br label %fusion.26.loop_header.dim.0 } $ opt -ipsccp -S < crash.ll opt: llvm/include/llvm/Analysis/ValueLattice.h:251: bool llvm::ValueLatticeElement::markConstant(llvm::Constant *, bool): Assertion `getConstant() == V && "Marking constant with different value"' failed.
Loading
Please sign in to comment