llvm/llvm-project

missed fold: (X * 0.0) * constant => X * 0.0

オープン

#85,241 opened on 2024/03/14

 (36 件のコメント) (1 件のリアクション) (1 人の担当者)C++ (10,782 件のフォーク)batch import
floating-pointgood first issuellvm:instcombinemissed-optimization

Repository metrics

Stars
 (26,378 個のスター)
PR merge metrics
 (PR metrics pending)

説明

https://alive2.llvm.org/ce/z/bKDTJd https://godbolt.org/z/v1qYrb5Ka

define float @src(float %0) {
entry:
  %1 = fmul float %0, 0.000000e+00
  %2 = fmul float %1, 3.000000e+00
  ret float %2
}

define float @tgt(float %0) {
entry:
  %1 = fmul float %0, 0.000000e+00
  ret float %1
}

@jayfoad @regehr

コントリビューターガイド