[clang] Switch DirectX Target to use the Itanium ABI (PR #111632)
Greg Roth via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 8 22:08:06 PDT 2024
================
@@ -56,14 +55,12 @@ void main() {
// CHECK-LABEL: define {{.*}}DoSilly
// CHECK-NEXT:entry:
-// CHECK-NEXT: [[ResPtr:%.*]] = alloca ptr
// CHECK-NEXT: [[ThisPtrAddr:%.*]] = alloca ptr
-// CHECK-NEXT: store ptr [[AggRes:%.*]], ptr [[ResPtr]]
// CHECK-NEXT: store ptr {{.*}}, ptr [[ThisPtrAddr]]
// CHECK-NEXT: [[ThisPtr:%.*]] = load ptr, ptr [[ThisPtrAddr]]
// CHECK-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[ThisPtr]], ptr align 4 [[Obj:%.*]], i32 8, i1 false)
// CHECK-NEXT: [[FirstAddr:%.*]] = getelementptr inbounds nuw %struct.Pair, ptr [[ThisPtr]], i32 0, i32 0
// CHECK-NEXT: [[First:%.*]] = load i32, ptr [[FirstAddr]]
// CHECK-NEXT: [[FirstPlusTwo:%.*]] = add nsw i32 [[First]], 2
// CHECK-NEXT: store i32 [[FirstPlusTwo]], ptr [[FirstAddr]]
-// CHECK-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 [[AggRes]], ptr align 4 [[Obj]], i32 8, i1 false)
+// CHECK-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 {{.*}}, ptr align 4 [[Obj]], i32 8, i1 false)
----------------
pow2clk wrote:
I can't explain exactly why the `ResPtr` alloca was removed, but it was clearly unnecessary. The wildcard here represents the same location as was previously captured in `AggRes` and copied into `ResPtr`, but then `ResPtr` was never used.
https://github.com/llvm/llvm-project/pull/111632
More information about the cfe-commits
mailing list