[LLVMbugs] [Bug 20472] New: Regression of llc between LLVM revisions 213897 and 213898.
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Jul 28 04:35:28 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=20472
Bug ID: 20472
Summary: Regression of llc between LLVM revisions 213897 and
213898.
Product: tools
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: llc
Assignee: unassignedbugs at nondot.org
Reporter: anton.mitrokhin at phystech.edu
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Reproducer:
a.ll:
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
; Function Attrs: nounwind
define void @f_fu(float* noalias nocapture %RET) #1 {
allocas:
%resultvec.i67 = select <8 x i1> <i1 1, i1 0, i1 0, i1 1, i1 1, i1 1, i1 1,
i1 0>, <8 x i16> <i16 128, i16 128, i16 128, i16 128, i16 128, i16 128, i16
128, i16 128>, <8 x i16> <i16 -500, i16 -500, i16 -500, i16 -500, i16 -500, i16
-500, i16 -500, i16 -500>
%result_load15_to_int8.i = trunc <8 x i16> %resultvec.i67 to <8 x i8>
%calltmp_to_float = sitofp <8 x i8> %result_load15_to_int8.i to <8 x float>
%ptrcast = bitcast float* %RET to <8 x float>*
store <8 x float> %calltmp_to_float, <8 x float>* %ptrcast, align 4
ret void
}
test_static.cpp:
#include <stdio.h>
extern "C" {
extern void f_fu(float *result);
}
int main(int argc, char *argv[]) {
float returned_result[4];
f_fu(returned_result);
printf("\n");
printf("res[0] = %f\n", returned_result[0]);
printf("res[1] = %f\n", returned_result[1]);
return 0;
}
Building:
.../llvm/bin-trunk_r213897/bin/llc a.ll -o old.s --mattr='+sse4.1'
clang++ test_static.cpp old.s -o bin_old
.../llvm/bin-trunk_r213898/bin/llc a.ll -o new.s --mattr='+sse4.1'
clang++ test_static.cpp new.s -o bin_new
right:
./bin_old
res[0] = -128.000000
res[1] = 12.000000
wrong:
./bin_new
res[0] = 128.000000
res[1] = -500.000000
--
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/20140728/98bbe12c/attachment.html>
More information about the llvm-bugs
mailing list