[PATCH] D149197: [X86] Add tests for `div/rem %x, (select c, <const>, 1)`; NFC

Phoebe Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 25 20:21:09 PDT 2023


pengfei added inline comments.


================
Comment at: llvm/test/CodeGen/X86/divrem-by-select.ll:140
+; CHECK-X64-V4-NEXT:    retq
+  %non_zero = add nsw nuw <2 x i64> %y, <i64 1, i64 1>
+  %d = select <2 x i1> %c, <2 x i64> %non_zero, <2 x i64> <i64 1, i64 1>
----------------
Why non_zero matters here? Dividen by 0 is posion, we don't need to cary its result.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149197



More information about the llvm-commits mailing list