[PATCH] D108139: [X86] Freeze vXi8 shl(x,1) -> add(x,x) vector fold (PR50468)

Pengfei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 22 17:38:54 PDT 2021


pengfei added inline comments.


================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:28729
 
-    // Simple i8 add case
-    if (Op.getOpcode() == ISD::SHL && ShiftAmt == 1)
+    // Simple i8 add case (freeze to handle add(undef, undef) case).
+    if (Op.getOpcode() == ISD::SHL && ShiftAmt == 1) {
----------------
Sorry, I don't quite understand the background. My question is why don't we check the oprand is a undef?
The affected tests seem all reasonable values, though they seem not have regressions.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108139



More information about the llvm-commits mailing list