[llvm] VectorCombine: teach foldExtractedCmps about samesign (PR #122883)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 14 06:38:27 PST 2025
fhahn wrote:
It looks like this introduced a new crash:
```
target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-n32:64-S128-Fn32"
target triple = "arm64-apple-macosx15.0.0"
define fastcc float @test() {
entry:
br label %if.end407
if.then374: ; No predecessors!
br label %if.end407
if.end407: ; preds = %if.then374, %entry
%overflow.1 = phi double [ 0.000000e+00, %entry ], [ 0.000000e+00, %if.then374 ]
%0 = load i32, ptr null, align 4
%cmp442 = fcmp ogt double %overflow.1, 0.000000e+00
%cmp446 = icmp samesign ugt i32 %0, 0
%or.cond238 = and i1 %cmp442, %cmp446
ret float 0.000000e+00
}
```
```
$ bin/opt -p vector-combine reduced.ll
Unknown predicate!
UNREACHABLE executed at ../../../llvm/lib/IR/Instructions.cpp:3852!
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
```
https://github.com/llvm/llvm-project/pull/122883
More information about the llvm-commits
mailing list