[all-commits] [llvm/llvm-project] c21cd1: [DirectX backend] avoid generate redundant bitcast...
Xiang Li via All-commits
all-commits at lists.llvm.org
Fri Sep 1 17:08:53 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c21cd168bb74175fe5fe33a404646b7d6dfe46a3
https://github.com/llvm/llvm-project/commit/c21cd168bb74175fe5fe33a404646b7d6dfe46a3
Author: Xiang Li <python3kgae at outlook.com>
Date: 2023-09-01 (Fri, 01 Sep 2023)
Changed paths:
M llvm/lib/Target/DirectX/DXILPrepare.cpp
M llvm/test/CodeGen/DirectX/typed_ptr.ll
Log Message:
-----------
[DirectX backend] avoid generate redundant bitcast in DXILPrepareModule (#65163)
When emit NoOp bitcast for GEP Ptr Operand, should use SourceElementType
instead of ResultElementType.
**Behavior Before Change**
Redundant bitcast like
` bitcast ptr addrspace(3) @gs to ptr addrspace(3)`
will be generated for llvm/test/CodeGen/DirectX/typed_ptr.ll
**Behavior After Change**
No bitcast will be generated.
Fixes https://github.com/llvm/llvm-project/issues/65183
More information about the All-commits
mailing list