llvm/llvm-project

missed fold, sext(fptosi x to i32) => fptosi x to i64

Open

#85 268 ouverte le 14 mars 2024

Voir sur GitHub
 (13 commentaires) (0 réactions) (1 assigné)C++ (10 782 forks)batch import
floating-pointgood first issuellvm:codegenmissed-optimization

Métriques du dépôt

Stars
 (26 378 stars)
Métriques de merge PR
 (Merge moyen 1j 2h) (1 000 PRs mergées en 30 j)

Description

https://alive2.llvm.org/ce/z/bFW9vZ online Alive timed out for this one, you'll need local alive2 with larger smt-to.

define i64 @src(float %0) {
if.end27:
%1 = fptosi float %0 to i32
%2 = sext i32 %1 to i64
ret i64 %2

sink: ; No predecessors!
unreachable
}

define i64 @tgt(float %0) {
if.end27:
%1 = fptosi float %0 to i64
ret i64 %1

sink: ; No predecessors!
unreachable
}

no brainer, same pattern applies to fptoui.

Guide contributeur