[PATCH] D98757: [AMX] Not fold constant bitcast into amx intrisic

2021-03-18 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D98757#2633396 , @xiangzhangllvm wrote: > In D98757#2631042 , @lebedev.ri > wrote: > >> The ongoing special-casing of `X86_AMXTy` through the llvm due to the >> inability of the existing

[PATCH] D98757: [AMX] Not fold constant bitcast into amx intrisic

2021-03-17 Thread Xiang Zhang via Phabricator via cfe-commits
xiangzhangllvm added a comment. In D98757#2631042 , @lebedev.ri wrote: > The ongoing special-casing of `X86_AMXTy` through the llvm due to the > inability of the existing backend passes to handle certain llvm ir constructs. We have bring up it to llvm-de

[PATCH] D98757: [AMX] Not fold constant bitcast into amx intrisic

2021-03-17 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D98757#2631036 , @xiangzhangllvm wrote: > In D98757#2631019 , @lebedev.ri > wrote: > >> Once again, i suggest to bring this up on llvm-dev. > > That is obvious, > Discuss what, can y

[PATCH] D98757: [AMX] Not fold constant bitcast into amx intrisic

2021-03-17 Thread Xiang Zhang via Phabricator via cfe-commits
xiangzhangllvm added a comment. In D98757#2631019 , @lebedev.ri wrote: > Once again, i suggest to bring this up on llvm-dev. That is obvious, Discuss what, can you point it out clearly ? The topic is do it in mid-end or back-end ? Repository: rG LLVM

[PATCH] D98757: [AMX] Not fold constant bitcast into amx intrisic

2021-03-17 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Once again, i suggest to bring this up on llvm-dev. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98757/new/ https://reviews.llvm.org/D98757 ___ cfe-commits mailing list cfe-c

[PATCH] D98757: [AMX] Not fold constant bitcast into amx intrisic

2021-03-17 Thread Xiang Zhang via Phabricator via cfe-commits
xiangzhangllvm added a comment. In D98757#2630968 , @lebedev.ri wrote: > I think that is a traditional backend problem that the pass will just have to > be updated to deal with. Hi @lebedev.ri , seems there is some mistakes, let me first point out the p

[PATCH] D98757: [AMX] Not fold constant bitcast into amx intrisic

2021-03-17 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D98757#2630961 , @xiangzhangllvm wrote: > In D98757#2630942 , @lebedev.ri > wrote: > >> I strongly suggest you bring up this ongoing creep of `if >> (DestTy->isX86_AMXTy()) return f

[PATCH] D98757: [AMX] Not fold constant bitcast into amx intrisic

2021-03-17 Thread Xiang Zhang via Phabricator via cfe-commits
xiangzhangllvm added a comment. In D98757#2630942 , @lebedev.ri wrote: > I strongly suggest you bring up this ongoing creep of `if > (DestTy->isX86_AMXTy()) return false;` on llvm-dev. > I strongly supsect you are covering up bugs in you backend/pass with

[PATCH] D98757: [AMX] Not fold constant bitcast into amx intrisic

2021-03-17 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri requested changes to this revision. lebedev.ri added a comment. This revision now requires changes to proceed. I strongly suggest you bring up this ongoing creep of `if (DestTy->isX86_AMXTy()) return false;` on llvm-dev. I strongly suggest you are covering up bugs in you backend/pass w

[PATCH] D98757: [AMX] Not fold constant bitcast into amx intrisic

2021-03-16 Thread Xiang Zhang via Phabricator via cfe-commits
xiangzhangllvm added inline comments. Comment at: llvm/lib/Analysis/ConstantFolding.cpp:101 /// Constant fold bitcast, symbolically evaluating it with DataLayout. /// This always returns a non-null constant, but it may be a /// ConstantExpr if unfoldable. clin

[PATCH] D98757: [AMX] Not fold constant bitcast into amx intrisic

2021-03-16 Thread Chang Lin via Phabricator via cfe-commits
clin1 added inline comments. Comment at: llvm/lib/Analysis/ConstantFolding.cpp:101 /// Constant fold bitcast, symbolically evaluating it with DataLayout. /// This always returns a non-null constant, but it may be a /// ConstantExpr if unfoldable. xiangzhangllv

[PATCH] D98757: [AMX] Not fold constant bitcast into amx intrisic

2021-03-16 Thread Xiang Zhang via Phabricator via cfe-commits
xiangzhangllvm added a comment. In D98757#2630844 , @LuoYuanke wrote: > Probably we need a .ll test case to for constant folding. Fold constant is done in CSE and SCCP which are both passes run in Clang (O2 )

[PATCH] D98757: [AMX] Not fold constant bitcast into amx intrisic

2021-03-16 Thread LuoYuanke via Phabricator via cfe-commits
LuoYuanke added a comment. > at clang/test/CodeGen/X86/amx_api.c Probably we need a .ll test case to for constant folding. Comment at: llvm/lib/Analysis/ConstantFolding.cpp:108 + // We won't fold bitcast for tile type, becasue there is no way to + // assigne a tmm reg from

[PATCH] D98757: [AMX] Not fold constant bitcast into amx intrisic

2021-03-16 Thread Chang Lin via Phabricator via cfe-commits
clin1 added inline comments. Comment at: llvm/lib/Analysis/ConstantFolding.cpp:101 /// Constant fold bitcast, symbolically evaluating it with DataLayout. /// This always returns a non-null constant, but it may be a /// ConstantExpr if unfoldable. API for this

[PATCH] D98757: [AMX] Not fold constant bitcast into amx intrisic

2021-03-16 Thread Xiang Zhang via Phabricator via cfe-commits
xiangzhangllvm added a comment. In D98757#2630764 , @LuoYuanke wrote: > Would you add a test case for it? at clang/test/CodeGen/X86/amx_api.c Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98757/new/ https

[PATCH] D98757: [AMX] Not fold constant bitcast into amx intrisic

2021-03-16 Thread LuoYuanke via Phabricator via cfe-commits
LuoYuanke added a comment. Would you add a test case for it? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98757/new/ https://reviews.llvm.org/D98757 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[PATCH] D98757: [AMX] Not fold constant bitcast into amx intrisic

2021-03-16 Thread Xiang Zhang via Phabricator via cfe-commits
xiangzhangllvm added inline comments. Comment at: clang/test/CodeGen/X86/amx_api.c:39 +void test_tile_init(short row, short col) { + __tile1024i c = {row, col, {1, 2, 3}}; + __tile_stored(buf, STRIDE, c); we usually write like this __tile1024i c = {row, col}; r

[PATCH] D98757: [AMX] Not fold constant bitcast into amx intrisic

2021-03-16 Thread Xiang Zhang via Phabricator via cfe-commits
xiangzhangllvm created this revision. xiangzhangllvm added reviewers: LuoYuanke, pengfei, LiuChen3, yubing. Herald added a subscriber: hiraditya. xiangzhangllvm requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. We won't fold