summaryrefslogtreecommitdiff
path: root/lldb/test/API/python_api/thread/TestThreadAPI.py
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2020-11-03 10:41:52 -0500
committerSanjay Patel <spatel@rotateright.com>2020-11-03 11:03:47 -0500
commit3c050a597c599cea035537b8875774dcc48922c3 (patch)
tree2119fe1431cdff568cf8cc7a52438d9756c2061e /lldb/test/API/python_api/thread/TestThreadAPI.py
parent1d3cd7172b2fb62a41fb962bc506913e2a6e8a8e (diff)
[CostModel] fix cost calc bug for sadd/ssub with overflow
As noted in D90554, there's an opcode typo in using an easily misused cost model API: getCmpSelInstrCost(). Beyond that, the assumed sequence of ops is questionable, but that would be another patch. My guess is that the x86 test diffs show that we are probably wrong both before and after this change, so there will be no practical difference. As an example, I tried this test which shows a cost of '7' either way: define <4 x i32> @sadd(<4 x i32> %va, <4 x i32> %vb) { %V4I32 = call {<4 x i32>, <4 x i1>} @llvm.sadd.with.overflow.v4i32(<4 x i32> %va, <4 x i32> %vb) %ov = extractvalue {<4 x i32>, <4 x i1>} %V4I32, 1 %r = extractvalue {<4 x i32>, <4 x i1>} %V4I32, 0 %z = select <4 x i1> %ov, <4 x i32> <i32 42, i32 42, i32 42, i32 42>, <4 x i32> %r ret <4 x i32> %z } $ llc -o - sadd.ll -mattr=avx vpaddd %xmm1, %xmm0, %xmm2 vpcmpgtd %xmm2, %xmm0, %xmm0 vpxor %xmm0, %xmm1, %xmm0 vblendvps %xmm0, LCPI0_0(%rip), %xmm2, %xmm0a Differential Revision: https://reviews.llvm.org/D90681
Diffstat (limited to 'lldb/test/API/python_api/thread/TestThreadAPI.py')
0 files changed, 0 insertions, 0 deletions