================
@@ -6878,6 +6878,41 @@ void Verifier::visitIntrinsicCall(Intrinsic::ID ID,
CallBase &Call) {
&Call);
break;
}
+ case Intrinsic::structured_gep: {
+ // Parser should refuse those 2 cases.
+ assert(Call.getNumOperands() >= 2);
----------------
Keenuts wrote:
zero-index case is valid (returns the pointer as-is with no change)
The 2 base arguments are:
- ptr base
- Intrinsic definition (at least looks like so when calling
`Call.getOperand(LAST).dump()`
```
(lldb) p Call.dump()
%ptr = call ptr (ptr, ...) @llvm.structured.gep.p0(ptr elementtype(%S) %src,
i32 0, i32 0)
(lldb) p Call.getOperand(3)->dump()
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn
memory(none)
declare ptr @llvm.structured.gep.p0(ptr %0, ...)
```
https://github.com/llvm/llvm-project/pull/176145
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits