[llvm-bugs] [Bug 30543] New: 4.0 Regression in llvm.powi.f64 lowering on ARM
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Sep 27 11:19:13 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=30543
Bug ID: 30543
Summary: 4.0 Regression in llvm.powi.f64 lowering on ARM
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Backend: ARM
Assignee: unassignedbugs at nondot.org
Reporter: yyc1992 at gmail.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
Compiling the following IR on arm
```
target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
target triple = "armv7l-unknown-linux-gnueabihf"
@.str = private unnamed_addr constant [4 x i8] c"%f\0A\00", align 1
; Function Attrs: noinline norecurse nounwind readnone
define double @f(double, i32) #0 {
top:
%2 = tail call double @llvm.powi.f64(double %0, i32 %1)
ret double %2
}
; Function Attrs: nounwind readnone
declare double @llvm.powi.f64(double, i32)
; Function Attrs: nounwind
define i32 @main() {
%1 = tail call double @f(double 2.000000e+00, i32 62)
%2 = tail call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8],
[4 x i8]* @.str, i32 0, i32 0), double %1)
ret i32 0
}
; Function Attrs: nounwind
declare i32 @printf(i8* nocapture readonly, ...)
attributes #0 = { noinline }
```
prints 2.0 instead of what 2^62 should be.
This is a regression in llvm 4.0 and is causing a lot of test failures in
julia.
Difference in the assembly
```
- .save {r11, lr}
- push {r11, lr}
- mov r2, r0
- vmov r0, r1, d0
- bl __powidf2
- vmov d0, r0, r1
- pop {r11, pc}
+ b __powidf2
```
GDB confirmed that the input value to `__powidf2` is wrong.
Currently bisecting.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160927/8678c559/attachment.html>
More information about the llvm-bugs
mailing list