Commit f90167c8 authored by Timothy Pearson's avatar Timothy Pearson
Browse files

Add notes regarding Clang 16 miscompilation and Clang 17 minimum requirement

parent ef3024bd
......@@ -10,6 +10,43 @@ export QUILT_REFRESH_ARGS="-p ab --no-timestamps --no-index"
quilt push -a
=================================================================================
MINIMUM SYSTEM REQUIREMENTS
LLVM 17 or higher
**** WARNING ****
LLVM 16 is known to miscompile part of v8!
At optimization levels higher than -O0, when using LTO, under specific
circumstances involving array access of floating point numbers, the following
(condensed) invalid instruction sequence is emitted:
li r4,-15
rldic r4,r4,3,29
lfdx f1,r3,r4
Examples bytecode files that trigger the issue are located in
compiler_bugs/clang_16/strtod_o[0|1].bc for analysis.
To see the invalid assembler, compile to native object code via:
llc-16 strtod_o1.bc -filetype=obj -o strtod.o
and disassemble via:
objdump -S strtod.o
Note that llc-17 emits a completely different and more sensible instruction
sequence:
subfic r6,r8,15
rldic r4,r6,3,29
lfdx f1,r5,r4
where r8 is loaded via other setup routines prior to entering the index
access segment of the code. Likely, the optimizer in Clang 16 makes an
incorrect assumption about r8 (in this example) always equalling 0x0, when
in fact 0x0 would be an invalid value for r8.
=================================================================================
NOTE
......
File added
File added
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment