[PATCH] D151848: [X86, Peephole] Enable FoldImmediate for X86

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 20 16:38:01 PDT 2023


MatzeB added inline comments.


================
Comment at: llvm/lib/Target/X86/X86InstrInfo.cpp:4905
+
+  if (!isInt<32>(ImmVal))
+    return false;
----------------
Is this correct? I haven't gone over the patch or read up on the details... But I'm worried this mixes up signed/unsigned representations. For example `int64_t{-1}` passes an `isInt<32>()` check but does not pass an `isUInt<32>()` check. Wouldn't it depend on the operation on whether we should interpret the immediate as signed or unsigned?


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

https://reviews.llvm.org/D151848



More information about the llvm-commits mailing list