Skip to content

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

@zhengyang92

Description

@zhengyang92

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

Metadata

Metadata

Assignees

Labels

floating-pointFloating-point mathgood first issuehttps://github.com/llvm/llvm-project/contributellvm:instcombineCovers the InstCombine, InstSimplify and AggressiveInstCombine passesmissed-optimization

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions