Add patterns, for two vector operands, that use a normal add node along with an arm vshr imm node.
Details
Diff Detail
Unit Tests
Time | Test | |
---|---|---|
280 ms | LLVM.CodeGen/Thumb2::Unknown Unit Message ("") |
Event Timeline
We had these patterns before and took them out because they were not correct. My understanding is that these instructions do trunc(shift(add(sext(a), sext(b)), 1)). They internally operate in a higher bitwidth than we natively have.
See rGe9e1daf2b9e800c00a3c08db53650c1569288a1b for the revert, which includes some examples in the commit message. I think I left the tests in for them though.
Maybe there's something we can do here with no wrap flags? Or patterns with extensions in them?
Ah yes, now I see '[esize:1]' has the result bit range. That's a bit annoying, but quite cool... I think using no wrap flags sounds neater, as I can just add a PatFrag. I guess I should emit the i8 patterns though as they won't trigger?
Seems OK, from what I can tell. And http://volta.cs.utah.edu:8080/z/8mUFbh says this is OK. My fuzzer really isn't going to like it, but that's a separate issue!
llvm/lib/Target/ARM/ARMInstrMVE.td | ||
---|---|---|
2089 | Can you add a comment about how this instruction is using a higher bitwidth type, and the nowrap makes sure we don't overflow when only dealing with lower bitwidth? |
Can you add a comment about how this instruction is using a higher bitwidth type, and the nowrap makes sure we don't overflow when only dealing with lower bitwidth?