[PATCH] D114148: [fir] Add fircg.ext_embox conversion

Kiran Chandramohan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 30 03:13:56 PST 2021


kiranchandramohan added inline comments.


================
Comment at: flang/lib/Optimizer/CodeGen/CodeGen.cpp:1791
+      if (!xbox.substr().empty())
+        base = shiftSubstringBase(rewriter, loc, base, xbox.substr()[0]);
+    }
----------------
clementval wrote:
> kiranchandramohan wrote:
> > I think the last argument is using the original operand and not the converted operand.
> Not sure I follow. `xbox.substr()[0]` has no conversion before this use. 
I meant xbox.substr()[0] is the original substr operand of the XEmbox operation and not the converted operand. In conversion patterns we should use the converted operands. So, shouldn't we access the converted operand using something like operands[xbox.substrOffset()]?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D114148/new/

https://reviews.llvm.org/D114148



More information about the llvm-commits mailing list