summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
diff options
context:
space:
mode:
authorHan Zhu <zhuhan7737@gmail.com>2023-04-20 13:41:46 -0700
committerHan Zhu <zhuhan7737@gmail.com>2023-04-24 13:54:37 -0700
commit075202d126dfba6fd1503926808a2fcafab1714a (patch)
tree08d219bec0c8d8bc9e950013a1ee10ec00b35f91 /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
parent7090c102731192d5abafb7e0b2b49adb4912efae (diff)
[X86 isel] Fix permute mask calculation in lowerShuffleAsUNPCKAndPermute
This fixes [issue 62242](https://github.com/llvm/llvm-project/issues/62242) This code block can potentially swap the order of V1 and V2 in Ops and therefore also in the unpck instruction generated. ``` SDValue &Op = Ops[Elt & 1]; if (M < NumElts && (Op.isUndef() || Op == V1)) Op = V1; else if (NumElts <= M && (Op.isUndef() || Op == V2)) { Op = V2; NormM -= NumElts; } else return SDValue(); ``` But the permute mask is calculated assuming the first operand being V1 and second V2, therefore causing a mis-compile. First check if the input operands are swapped, and then calculate the permute mask based on that. Differential Revision: https://reviews.llvm.org/D148843
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp')
0 files changed, 0 insertions, 0 deletions