https://bugs.llvm.org/show_bug.cgi?id=34866
Bug ID: 34866
Summary: [Regression] Infinite loop in SoftenFloatOperand
Product: libraries
Version: 5.0
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Common Code Generator Code
Assignee: unassignedb...@nondot.org
Reporter: bma...@codeaurora.org
CC: c...@google.com, florian.h...@arm.com,
llvm-bugs@lists.llvm.org, mcros...@codeaurora.org
Blocks: 34492
The following code no longer compiles:
$ cat test.c
typedef unsigned __int128 u128_t;
typedef __float128 f128_t;
typedef union
{
f128_t f;
u128_t i;
} union128_t;
int test(volatile f128_t *start_X_ptr, volatile f128_t *start_Y_ptr)
{
for (unsigned iter_count = 1; iter_count <= 2; iter_count++)
{
union128_t read_valX = { .f = *start_X_ptr };
union128_t read_valY = { .f = *start_Y_ptr };
u128_t expected_val = ((iter_count - 1) * read_valY.i);
if (read_valX.i != expected_val)
{
return -1;
}
union128_t write_valX = { .i = (iter_count * (read_valX.i + 1)) };
union128_t write_valY = { .i = (read_valX.i + 1) };
*start_X_ptr = write_valX.f;
*start_Y_ptr = write_valY.f;
}
return 0;
}
because of an infinite loop in SoftenFloatOperand.
$ clang -O3 -c test.c -mllvm -debug-only=legalize-types
....
Soften float operand 0: t33: v16i8 = bitcast t20
Soften float operand 0: t33: v16i8 = bitcast t20
Soften float operand 0: t33: v16i8 = bitcast t20
Soften float operand 0: t33: v16i8 = bitcast t20
Soften float operand 0: t33: v16i8 = bitcast t20
Soften float operand 0: t33: v16i8 = bitcast t20
Soften float operand 0: t33: v16i8 = bitcast t20
Soften float operand 0: t33: v16i8 = bitcast t20
Works with LLVM4.0.1: https://godbolt.org/g/W8cULV
I suspect this was introduced in r254653 and got exposed sometime between
03/14/2017 and 03/17/2017.
Referenced Bugs:
https://bugs.llvm.org/show_bug.cgi?id=34492
[Bug 34492] [meta] 5.0.1 Release Blockers
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs