InstCombine infinite-loops for the testcase added
It is because InstCombine is generating instructions that can be
optimized by itself. Fix by not optimizing frem if the optimized
type is the same as original type.
rdar://problem/19150820
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
LGTM with tweaks
test/Transforms/InstCombine/fpcast.ll | ||
---|---|---|
84–86 | this should be: |
Comment Actions
Sorry I forget to add llvm-commits for the first try. Since David has already reviewed it, I will not create a new review.
Steven
this should be:
; CHECK-NEXT: %[[frem:.*]] = frem double %[[fext]], 1.000000e-01
; CHECK-NEXT: %[[trunc:.*]] = fptrunc double %[[frem]] to float
; CHECK-NEXT: ret float %[[trunc]]