Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Raptor Engineering Public Development
Chromium
OpenPOWER Patches
Commits
f90167c8
Commit
f90167c8
authored
5 months ago
by
Timothy Pearson
Browse files
Options
Download
Email Patches
Plain Diff
Add notes regarding Clang 16 miscompilation and Clang 17 minimum requirement
parent
ef3024bd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
0 deletions
+37
-0
README
README
+37
-0
compiler_bugs/clang_16/strtod_o0.bc
compiler_bugs/clang_16/strtod_o0.bc
+0
-0
compiler_bugs/clang_16/strtod_o1.bc
compiler_bugs/clang_16/strtod_o1.bc
+0
-0
No files found.
README
View file @
f90167c8
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
compiler_bugs/clang_16/strtod_o0.bc
0 → 100644
View file @
f90167c8
File added
This diff is collapsed.
Click to expand it.
compiler_bugs/clang_16/strtod_o1.bc
0 → 100644
View file @
f90167c8
File added
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment