[llvm-bugs] [Bug 44918] New: [AArch64] SLH is completely broken with GlobalISel
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Feb 14 12:58:14 PST 2020
https://bugs.llvm.org/show_bug.cgi?id=44918
Bug ID: 44918
Summary: [AArch64] SLH is completely broken with GlobalISel
Product: libraries
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Backend: AArch64
Assignee: unassignedbugs at nondot.org
Reporter: efriedma at quicinc.com
CC: arnaud.degrandmaison at arm.com, kristof.beyls at arm.com,
llvm-bugs at lists.llvm.org, peter.smith at linaro.org,
Ties.Stuij at arm.com
Testcase:
target triple = "aarch64-unknown-linux-gnu"
define void @foo(i32 %inp, void ()* nocapture %bar) speculative_load_hardening
{
entry:
%cmp = icmp slt i32 %inp, 10
br i1 %cmp, label %if.then, label %if.end
if.then:
tail call void %bar() #1
br label %if.end
if.end:
ret void
}
Build with llc -O0. Produces:
cmp w0, #10 // =10
cset w8, ge
tst w8, #0x3
str x1, [sp, #8] // 8-byte Folded Spill
b.eq .LBB0_2
(LBB0_2 is if.end).
Note the condition is backwards: we branch to if.end if the input is less than
10. Apparently nobody ever did any testing of speculative load hardening at
-O0?
--
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/20200214/9e441608/attachment.html>
More information about the llvm-bugs
mailing list