Subtraction from zero and floating point negation do not have the same
semantics, so fix lowering.
Details
Diff Detail
- Repository
- rL LLVM
- Build Status
Buildable 23616 Build 23615: arc lint + arc unit
Event Timeline
lib/Target/WebAssembly/WebAssemblyInstrSIMD.td | ||
---|---|---|
501–502 | Can we define ivneg or something like // Integer vector negation def ivneg : PatFrag<(ops node:$in), (sub immAllZeroesV, node:$in)>; And change this pattern to resemble the simpler SIMDNegFP one, using ivneg in place of fneg, to make it simpler and symmetrical? The reason I said ivneg instead of ineg is there's already an [[ https://github.com/llvm-mirror/llvm/blob/8cc4d7e1c6c2a61e560268413a1355d0260a81b3/include/llvm/Target/TargetSelectionDAG.td#L757 | ineg ]] node there, which does not seem to support vectors. And this is irrelevant to this CL, but there also seems to be a [[ https://github.com/llvm-mirror/llvm/blob/8cc4d7e1c6c2a61e560268413a1355d0260a81b3/include/llvm/Target/TargetSelectionDAG.td#L756 | vnot ]] node. Can we possibly use this to simplify SIMDNot pattern? | |
test/CodeGen/WebAssembly/simd-arith.ll | ||
747 | To make this to work, does a floating point instruction has to have fast attribute, or only some of these fast-math flags? |
test/CodeGen/WebAssembly/simd-arith.ll | ||
---|---|---|
747 | One-line comment on why nsz is necessary would be good |
Can we define ivneg or something like
And change this pattern to resemble the simpler SIMDNegFP one, using ivneg in place of fneg, to make it simpler and symmetrical? The reason I said ivneg instead of ineg is there's already an [[ https://github.com/llvm-mirror/llvm/blob/8cc4d7e1c6c2a61e560268413a1355d0260a81b3/include/llvm/Target/TargetSelectionDAG.td#L757 | ineg ]] node there, which does not seem to support vectors.
And this is irrelevant to this CL, but there also seems to be a [[ https://github.com/llvm-mirror/llvm/blob/8cc4d7e1c6c2a61e560268413a1355d0260a81b3/include/llvm/Target/TargetSelectionDAG.td#L756 | vnot ]] node. Can we possibly use this to simplify SIMDNot pattern?