[LLVMbugs] [Bug 23627] New: Regression: ARM jump table miscompilation
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu May 21 19:46:29 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=23627
Bug ID: 23627
Summary: Regression: ARM jump table miscompilation
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Backend: ARM
Assignee: unassignedbugs at nondot.org
Reporter: peter at pcc.me.uk
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 14366
--> https://llvm.org/bugs/attachment.cgi?id=14366&action=edit
source
Given the attached hist.cc, after reverting r237972:
$ clang -march=armv7-a -mtune=generic-armv7-a -mfpu=vfpv3-d16
-mfloat-abi=softfp -mthumb -target arm-linux-androideabi -Oz
-fomit-frame-pointer -fno-exceptions -fno-rtti -fno-threadsafe-statics
-std=gnu++11 -S -w hist.cc
produces the attached hist.s. The miscompiled code starts on line 564:
@ BB#26:
adr.w r0, .LJTI1_0
add.w r0, r0, r1, lsl #2
.LCPI1_48:
tbh [r0, r1, lsl #1]
.align 2
@ BB#27:
.LCPI1_49:
.long 600000 @ 0x927c0
@ BB#28:
.LJTI1_0:
.short (.LBB1_29-(.LCPI1_48+4))/2
.short (.LBB1_32-(.LCPI1_48+4))/2
.short (.LBB1_42-(.LCPI1_48+4))/2
.short (.LBB1_38-(.LCPI1_48+4))/2
.short (.LBB1_41-(.LCPI1_48+4))/2
In this code the tbh instruction ends up loading from .LJTI_0 + (r1 << 2) + (r1
<< 1) instead of the intended .LJTI0 + (r1 << 1).
--
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/20150522/d5153887/attachment.html>
More information about the llvm-bugs
mailing list