[PATCH] D103874: [IR] Rename the shufflevector's undef mask to poison

2022-08-10 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune added inline comments. Comment at: clang/test/CodeGen/X86/avx-builtins.c:182 // CHECK-LABEL: test_mm256_castsi128_si256 - // CHECK: shufflevector <2 x i64> %{{.*}}, <2 x i64> %{{.*}}, <4 x i32> + // CHECK: shufflevector <2 x i64> %{{.*}}, <2 x i64> %{{.*}}, <4 x i32>

[PATCH] D103874: [IR] Rename the shufflevector's undef mask to poison

2022-06-27 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune added a comment. PR31524 (https://github.com/llvm/llvm-project/issues/31524) discusses about the lowering of such intrinsics. According to the PR, it seems users consider undefined intrinsics as returning unknown but consistent bits. If it works, my updates in the draft (https://github.

[PATCH] D103874: [IR] Rename the shufflevector's undef mask to poison

2022-06-27 Thread Nikita Popov via Phabricator via cfe-commits
nikic added a comment. In D103874#3611507 , @aqjune wrote: > In D103874#3611483 , @nikic wrote: > >> Which intrinsic are you working on here? If this is about the mm_undefined >> intrinsics, why do we need to cha

[PATCH] D103874: [IR] Rename the shufflevector's undef mask to poison

2022-06-27 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune added a comment. In D103874#3611483 , @nikic wrote: > Which intrinsic are you working on here? If this is about the mm_undefined > intrinsics, why do we need to change those from the current status quo of > using a zero value instead of undef? I

[PATCH] D103874: [IR] Rename the shufflevector's undef mask to poison

2022-06-27 Thread Nikita Popov via Phabricator via cfe-commits
nikic added a comment. Which intrinsic are you working on here? If this is about the mm_undefined intrinsics, why do we need to change those from the current status quo of using a zero value instead of undef? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D103874: [IR] Rename the shufflevector's undef mask to poison

2022-06-27 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune added a comment. In D103874#3594617 , @aqjune wrote: > It seems llvm/lib/Target/X86/X86ISelLowering.cpp's LowerAVXCONCAT_VECTORS is > relevant to efficient lowering of `shufflevector %x, freeze(poison), mask`. After patching `LowerAVXCONCAT_VECTO

[PATCH] D103874: [IR] Rename the shufflevector's undef mask to poison

2022-06-19 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune added a comment. Herald added subscribers: jsji, kosarev. Herald added a project: All. It seems llvm/lib/Target/X86/X86ISelLowering.cpp's LowerAVXCONCAT_VECTORS is relevant to efficient lowering of `shufflevector %x, freeze(poison), mask`. Repository: rG LLVM Github Monorepo CHANGES S

[PATCH] D103874: [IR] Rename the shufflevector's undef mask to poison

2021-09-26 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune marked an inline comment as done. aqjune added inline comments. Comment at: clang/test/CodeGen/X86/avx-builtins.c:182 // CHECK-LABEL: test_mm256_castsi128_si256 - // CHECK: shufflevector <2 x i64> %{{.*}}, <2 x i64> %{{.*}}, <4 x i32> + // CHECK: shufflevector <2 x i

[PATCH] D103874: [IR] Rename the shufflevector's undef mask to poison

2021-09-26 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune updated this revision to Diff 375095. aqjune added a comment. Resurrect mistakenly removed test statements Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103874/new/ https://reviews.llvm.org/D103874 Files: clang/test/CodeGen/X86/avx-builti

[PATCH] D103874: [IR] Rename the shufflevector's undef mask to poison

2021-09-26 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune updated this revision to Diff 375094. aqjune added a comment. Herald added a subscriber: arphaman. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103874/new/ https://reviews.llvm.org/D103874 Files: clang/test/CodeGen/X86/avx-builtin

[PATCH] D103874: [IR] Rename the shufflevector's undef mask to poison

2021-09-20 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added inline comments. Comment at: clang/test/CodeGen/X86/avx-builtins.c:182 // CHECK-LABEL: test_mm256_castsi128_si256 - // CHECK: shufflevector <2 x i64> %{{.*}}, <2 x i64> %{{.*}}, <4 x i32> + // CHECK: shufflevector <2 x i64> %{{.*}}, <2 x i64> %{{.*}}, <4 x i32

[PATCH] D103874: [IR] Rename the shufflevector's undef mask to poison

2021-06-08 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. > In practice, the frozen element won't be used in most of the cases; the > middle-end's demanded elements analysis will trigger instcombine to almost > always remove the freeze. Well, in the cases it gets removed, it doesn't really matter what we use. It's likely if

[PATCH] D103874: [IR] Rename the shufflevector's undef mask to poison

2021-06-08 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune added a comment. In D103874#2806519 , @efriedma wrote: > I noted the cases where it looks like the undef->poison change might actually > impact code using compiler intrinsic functions that have external > specifications. The relevant specificati

[PATCH] D103874: [IR] Rename the shufflevector's undef mask to poison

2021-06-08 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. I noted the cases where it looks like the undef->poison change might actually impact code using compiler intrinsic functions that have external specifications. The relevant specifications say the elements in question are "undefined", without really specifying what tha

[PATCH] D103874: [IR] Rename the shufflevector's undef mask to poison

2021-06-08 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune created this revision. aqjune added reviewers: nikic, efriedma, spatel, fhahn, lebedev.ri, RKSimon. Herald added a reviewer: deadalnix. Herald added subscribers: dexonsmith, kerbowa, pengfei, dmgreen, zzheng, kbarton, hiraditya, nhaehnle, jvesely, nemanjai. aqjune requested review of this r