[PATCH] D112435: [GlobalISel] Add G_BFI (bitfield insertion opcode)
Jessica Paquette via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 25 10:05:01 PDT 2021
paquette added inline comments.
================
Comment at: llvm/lib/CodeGen/MachineVerifier.cpp:1616
+ LLT DstTy = MRI->getType(MI->getOperand(0).getReg());
+ if (DstTy.isVector()) {
+ report("Bitfield insertion is not supported on vectors", MI);
----------------
Maybe add a FIXME or TODO here noting that it may make sense to extend this to vectors in the future? (I can't think of any use-cases, but maybe it makes sense on some target...)
================
Comment at: llvm/test/MachineVerifier/test_g_bfi.mir:13
+ ; CHECK: *** Bad machine code: Bitfield insertion is not supported on vectors ***
+ %bfi_vector:_(<2 x s64>) = G_BFI %v1, %v2, %v3, %v4
+...
----------------
Some tests that would be good to add:
Test that the verifier complains when...
- Type index 0 != type index 1
- Type index 1 != type index 2
- Type index 3 != type index 4
e.g.
```
%x:_(s32) = G_BFI %y:_(s64), ...
```
should complain
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112435/new/
https://reviews.llvm.org/D112435
More information about the llvm-commits
mailing list